-
-
Notifications
You must be signed in to change notification settings - Fork 14.4k
Rollup of 5 pull requests #150638
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rollup of 5 pull requests #150638
Conversation
… a different crate version than expected
```
error[E0277]: `?` couldn't convert the error to `dependency::Error`
--> replaced
|
LL | fn main() -> Result<(), Error> {
| ----------------- expected `dependency::Error` because of this
...
LL | Err(Error2)?;
| -----------^ the trait `From<Error2>` is not implemented for `dependency::Error`
| |
| this can't be annotated with `?` because it has type `Result<_, Error2>`
|
= note: the question mark operation (`?`) implicitly performs a conversion on the error value using the `From` trait
help: the trait `From<Error2>` is not implemented for `dependency::Error`
but trait `From<()>` is implemented for it
--> replaced
|
LL | impl From<()> for Error {
| ^^^^^^^^^^^^^^^^^^^^^^^
= help: for that trait implementation, expected `()`, found `Error2`
= note: there are multiple different versions of crate `dependency` in the dependency graph
= help: you can use `cargo tree` to explore your dependency tree
```
The existing checks rely on having access to the actual types/traits that diverged to detect they are called the same, come from different crates with the same name. The new check is less specific, merely looking to see if the crate name the involved type belongs has multiple crates.
The `forbid_generic` field in `Res::SelfTyAlias` is no longer needed. The check for generic `Self` types in anonymous constants is now handled by `check_param_uses_if_mcg` in HIR type lowering, making this field redundant. This removes: - The `forbid_generic` field from `Res::SelfTyAlias` - The hack in `rustc_resolve` that set `forbid_generic: true` when encountering `Self` in constant items - Related pattern matching and field propagation code
…nstable book and the rustc book
…jieyouxu
Detect cases where `?` is applied on a type that could be coming from a different crate version than expected
```
error[E0277]: `?` couldn't convert the error to `dependency::Error`
--> replaced
|
LL | fn main() -> Result<(), Error> {
| ----------------- expected `dependency::Error` because of this
...
LL | Err(Error2)?;
| -----------^ the trait `From<Error2>` is not implemented for `dependency::Error`
| |
| this can't be annotated with `?` because it has type `Result<_, Error2>`
|
= note: the question mark operation (`?`) implicitly performs a conversion on the error value using the `From` trait
help: the trait `From<Error2>` is not implemented for `dependency::Error`
but trait `From<()>` is implemented for it
--> replaced
|
LL | impl From<()> for Error {
| ^^^^^^^^^^^^^^^^^^^^^^^
= help: for that trait implementation, expected `()`, found `Error2`
= note: there are multiple different versions of crate `dependency` in the dependency graph
= help: you can use `cargo tree` to explore your dependency tree
```
The existing checks rely on having access to the actual types/traits that diverged to detect they are called the same, come from different crates with the same name. The new check is less specific, merely looking to see if the crate name the involved type belongs has multiple crates.
CC rust-lang#78552.
Removed confusing diagnostics note for trait required for `?` operator use - **test: modified `bad-question-mark-on-trait-objects` to match expected behavior** - **removed confusing message from diagnostics** fixes [rust-lang#150527](rust-lang#150527)
…neric-field, r=camelid,BoxyUwU Remove unneeded `forbid_generic` field from `Res::SelfTyAlias` Following rust-lang#150519, the `forbid_generic` field in `Res::SelfTyAlias` is no longer needed and can be removed. - Remove the `forbid_generic: bool` field from `Res::SelfTyAlias` - Simplify the ConstantItem rib handling in `rustc_resolve` - no longer need to mutate res to set `forbid_generic: true` - Update all pattern matches and constructors of `SelfTyAlias` Closes rust-lang#150579 r? ``@camelid``
…n, r=jieyouxu triagebot: Add a mention for `dec2flt`, `flt2dec`, and `fmt/num.rs`
…Kobzol Fix broken edit links in Unstable and rustc books Updated the edit-url-template for the unstable book and the rustc book. Fixes rust-lang#150593 The "Suggest an edit" links were pointing to HEAD, which resulted in a 404. Changed these to point to main. r? `@Kobzol`
|
@bors r+ rollup=never p=5 |
|
☀️ Test successful - checks-actions |
|
📌 Perf builds for each rolled up PR:
previous master: 00f49d2204 In the case of a perf regression, run the following command for each PR you suspect might be the cause: |
What is this?This is an experimental post-merge analysis report that shows differences in test outcomes between the merged PR and its parent PR.Comparing 00f49d2 (parent) -> 4c3310a (this PR) Test differencesShow 14 test diffs14 doctest diffs were found. These are ignored, as they are noisy. Test dashboardRun cargo run --manifest-path src/ci/citool/Cargo.toml -- \
test-dashboard 4c3310a6db02750ff0cfd0def09dd05c5942d723 --output-dir test-dashboardAnd then open Job duration changes
How to interpret the job duration changes?Job durations can vary a lot, based on the actual runner instance |
|
Finished benchmarking commit (4c3310a): comparison URL. Overall result: ✅ improvements - no action needed@rustbot label: -perf-regression Instruction countOur most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.
Max RSS (memory usage)This benchmark run did not return any relevant results for this metric. CyclesResults (secondary -2.9%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 472.503s -> 474.071s (0.33%) |
Successful merges:
?is applied on a type that could be coming from a different crate version than expected #150558 (Detect cases where?is applied on a type that could be coming from a different crate version than expected)?operator use #150570 (Removed confusing diagnostics note for trait required for?operator use)forbid_genericfield fromRes::SelfTyAlias#150589 (Remove unneededforbid_genericfield fromRes::SelfTyAlias)dec2flt,flt2dec, andfmt/num.rs#150635 (triagebot: Add a mention fordec2flt,flt2dec, andfmt/num.rs)r? @ghost
@rustbot modify labels: rollup
Create a similar rollup