Skip to content

Conversation

@matthiaskrgr
Copy link
Member

@matthiaskrgr matthiaskrgr commented Dec 3, 2025

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

WaffleLapkin and others added 24 commits December 1, 2025 15:49
This... is a weird test.

It has two impls:
- `impl<T> From<Foo<T>> for Box<T>` (commented out, more on that later), and
- `impl<T> Into<Vec<T>> for Foo<T>`

The idea of that test is to show that the first impl doesn't compile, but
the second does, thus `TryFrom` should be using `Into` and not `From`
(because `Into` is more general, since the `From` impl doesn't compile).

However:
1. The types are different -- `Box` vs `Vec`, which is significant b/c
   `Box` is fundamental
2. The commented out impl actually compiles! (which wasn't detected b/c
   it's commented out :\ )

Here is a table for compilation of the impls:

|        | `Vec`        | `Box`          |
|--------|--------------|----------------|
| `From` | since 1.41.0 | never          |
| `Into` | always       | not since 1.28 |

[godbolt used to test this](https://godbolt.org/z/T38E3jGKa)

Order of events:
1. in `1.28` the `incoherent_fundamental_impls` lint becomes deny by
   default (this is *not* mentioned in the changelog yay)
2. `1.32` changed absolutely nothing, even though this version is credited
   in the test
3. the test was added (I'm not exactly sure when)
   (see rust-lang#56796)
4. in `1.41` coherence was relaxed to allow `From`+`Vec` to compile

To conclude: since `1.41` this test does nothing (and before that it was
written in a way which did not detect this change). It looks to me like
today (since `1.41`) we *could* bound `TryFrom` impl with `From` (but now
it'd be a useless breaking change of course).

Am I missing anything? Is there a useful version of this test that could
be written?
We used to allow `T -> !` coercions (yes!! not `! -> T`) in unreachable
code. This was later removed during 2018 stabilization attempt, see:
- rust-lang#40800
- rust-lang@59688e1
- rust-lang#46325

I've kept `tests/ui/coercion/coerce-to-bang-cast.rs`, as that is a
reasonable test for us *not* having `-> !` coercions.
Duplicate of `from_infer_breaking_with_unit_fallback.rs` and
`question_mark_from_never.rs`
I don't think they are testing anything anymore
there are only 1 test in that directory, probably created by mistake.
…mingw`

`rust-lld` is supposed to live in sysroot, so it doesn't change the behavior of the function, only removes a potential micro-optimization.
…onszelmann

Remove an outdated test

This... is a weird test.

It has two impls:
- `impl<T> From<Foo<T>> for Box<T>` (commented out, more on that later), and
- `impl<T> Into<Vec<T>> for Foo<T>`

The idea of that test is to show that the first impl doesn't compile, but the second does, thus `TryFrom` should be using `Into` and not `From` (because `Into` is more general, since the `From` impl doesn't compile).

However:
1. The types are different -- `Box` vs `Vec`, which is significant b/c `Box` is fundamental
2. The commented out impl actually compiles! (which wasn't detected b/c it's commented out :\ )

Here is a table for compilation of the impls:

|        | `Vec`        | `Box`          |
|--------|--------------|----------------|
| `From` | since 1.41.0 | never          |
| `Into` | always       | not since 1.28 |

[godbolt used to test this](https://godbolt.org/z/T38E3jGKa)

Order of events:
1. in `1.28` the `incoherent_fundamental_impls` lint becomes deny by default (this is *not* mentioned in the changelog yay)
2. `1.32` changed absolutely nothing, even though this version is credited in the test
3. the test was added (I'm not exactly sure when) (see rust-lang#56796)
4. in `1.41` coherence was relaxed to allow `From`+`Vec` to compile

To conclude: since `1.41` this test does nothing (and before that it was written in a way which did not detect this change). It looks to me like today (since `1.41`) we *could* bound `TryFrom` impl with `From` (but now it'd be a useless breaking change of course).

Am I missing anything? Is there a useful version of this test that could be written?
…=ChrisDenton

Fix std::mem::drop rustdoc misleading statement

This is a bit misleading, we were discussing this with our Rust team and some people could think that the compiler does some special magic for this specific function and that's not true or well the compiler does something special but for every function.
The reality according to my understanding is that this is a normal function that takes ownership of the given value and as with every other function mir building injects Drop Terminators , drop elaboration refines this and then we would insert the corresponding drop glue, then potentially calling Drop::drop.

Not sure if it would be best to remove the sentence as this PR does or explaining something along the lines of the previous text.
…, r=lqd

Rename supertrait item shadowing lints

This follows the lang team decision [here](rust-lang#148605 (comment)) and renames:
- `supertrait_item_shadowing_definition` to `shadowing_supertrait_items`
- `supertrait_item_shadowing_usage` to `resolving_to_items_shadowing_supertrait_items`

The lint levels are left unchanged as allow-by-default until stabilization.
Various never type test improvements

I want to make sure that the never type ui tests are actually sensible, and to do so I'm trying to clean them up. This mainly adds comments explaining test purposes and removes outdated stuff.

I imagine best reviewed commit-by-commit, I tried to write useful descriptions and group things into small commits.

cc `@lcnr` (I removed `fallback`/`nofallback` terminology in b5f82d4)
linker: Remove special case for `rust-lld` in `detect_self_contained_mingw`

`rust-lld` is supposed to live inside sysroot, so it doesn't change the behavior of the function, only removes a potential micro-optimization.

rust-lang#149178 (comment)
r? `@mati865`
@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. rollup A PR which is a rollup labels Dec 3, 2025
@matthiaskrgr
Copy link
Member Author

@bors r+ rollup=never p=5

@bors
Copy link
Collaborator

bors commented Dec 3, 2025

📌 Commit 2cc93b8 has been approved by matthiaskrgr

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Dec 3, 2025
@bors
Copy link
Collaborator

bors commented Dec 3, 2025

⌛ Testing commit 2cc93b8 with merge 83e49b7...

@bors
Copy link
Collaborator

bors commented Dec 3, 2025

☀️ Test successful - checks-actions
Approved by: matthiaskrgr
Pushing 83e49b7 to main...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Dec 3, 2025
@bors bors merged commit 83e49b7 into rust-lang:main Dec 3, 2025
12 checks passed
@rustbot rustbot added this to the 1.93.0 milestone Dec 3, 2025
@rust-timer
Copy link
Collaborator

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#148918 Remove an outdated test 56e9f9a2b4bfc1624105252614e128bc46b3c49c (link)
#149244 Fix std::mem::drop rustdoc misleading statement 92d5b967b4e7ed63d3f806b08a124d312c377f30 (link)
#149532 Rename supertrait item shadowing lints 5815dec89469c661b264e3014ae2402f59924c11 (link)
#149541 Various never type test improvements 120c25c070bd8b077879109475ccb85c9356935e (link)
#149590 linker: Remove special case for rust-lld in `detect_self_… 5881e4e1496ca1bd6c7a68850be36050122d688f (link)

previous master: 568b117627

In the case of a perf regression, run the following command for each PR you suspect might be the cause: @rust-timer build $SHA

@github-actions
Copy link
Contributor

github-actions bot commented Dec 3, 2025

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 568b117 (parent) -> 83e49b7 (this PR)

Test differences

Show 172 test diffs

Stage 1

  • [ui] tests/ui/coercion/coerce-issue-49593-box-never.rs#e2021: [missing] -> pass (J0)
  • [ui] tests/ui/coercion/coerce-issue-49593-box-never.rs#e2024: [missing] -> pass (J0)
  • [ui] tests/ui/coercion/coerce-issue-49593-box-never.rs#fallback: pass -> [missing] (J0)
  • [ui] tests/ui/coercion/coerce-issue-49593-box-never.rs#nofallback: pass -> [missing] (J0)
  • [ui] tests/ui/coercion/coerce-to-bang.rs: pass -> [missing] (J0)
  • [ui] tests/ui/never/never-type-method-call-15207.rs: pass -> [missing] (J0)
  • [ui] tests/ui/never_type/defaulted-never-note.rs#e2021: [missing] -> pass (J0)
  • [ui] tests/ui/never_type/defaulted-never-note.rs#e2024: [missing] -> pass (J0)
  • [ui] tests/ui/never_type/defaulted-never-note.rs#fallback: pass -> [missing] (J0)
  • [ui] tests/ui/never_type/defaulted-never-note.rs#nofallback: pass -> [missing] (J0)
  • [ui] tests/ui/never_type/diverging-fallback-no-leak.rs#fallback: pass -> [missing] (J0)
  • [ui] tests/ui/never_type/diverging-fallback-no-leak.rs#nofallback: pass -> [missing] (J0)
  • [ui] tests/ui/never_type/diverging-fallback-unconstrained-return.rs#e2021: [missing] -> pass (J0)
  • [ui] tests/ui/never_type/diverging-fallback-unconstrained-return.rs#e2024: [missing] -> pass (J0)
  • [ui] tests/ui/never_type/diverging-fallback-unconstrained-return.rs#fallback: pass -> [missing] (J0)
  • [ui] tests/ui/never_type/diverging-fallback-unconstrained-return.rs#nofallback: pass -> [missing] (J0)
  • [ui] tests/ui/never_type/fallback-closure-ret.rs#e2021: [missing] -> pass (J0)
  • [ui] tests/ui/never_type/fallback-closure-ret.rs#e2024: [missing] -> pass (J0)
  • [ui] tests/ui/never_type/fallback-closure-ret.rs#fallback: pass -> [missing] (J0)
  • [ui] tests/ui/never_type/fallback-closure-ret.rs#nofallback: pass -> [missing] (J0)
  • [ui] tests/ui/never_type/fallback-closure-wrap.rs#e2021: [missing] -> pass (J0)
  • [ui] tests/ui/never_type/fallback-closure-wrap.rs#e2024: [missing] -> pass (J0)
  • [ui] tests/ui/never_type/fallback-closure-wrap.rs#fallback: pass -> [missing] (J0)
  • [ui] tests/ui/never_type/fallback-closure-wrap.rs#nofallback: pass -> [missing] (J0)
  • [ui] tests/ui/never_type/impl_trait_fallback.rs: pass -> [missing] (J0)
  • [ui] tests/ui/never_type/impl_trait_fallback2.rs: pass -> [missing] (J0)
  • [ui] tests/ui/never_type/impl_trait_fallback3.rs: pass -> [missing] (J0)
  • [ui] tests/ui/never_type/impl_trait_fallback4.rs: pass -> [missing] (J0)
  • [ui] tests/ui/never_type/never-type-method-call-15207.rs: [missing] -> pass (J0)
  • [ui] tests/ui/never_type/never-value-fallback-issue-66757.rs#fallback: pass -> [missing] (J0)
  • [ui] tests/ui/never_type/never-value-fallback-issue-66757.rs#nofallback: pass -> [missing] (J0)
  • [ui] tests/ui/never_type/try_from.rs: pass -> [missing] (J0)
  • convert::into_as_try_into: [missing] -> pass (J2)

Stage 2

  • [ui] tests/ui/coercion/coerce-issue-49593-box-never.rs#e2021: [missing] -> pass (J1)
  • [ui] tests/ui/coercion/coerce-issue-49593-box-never.rs#e2024: [missing] -> pass (J1)
  • [ui] tests/ui/coercion/coerce-issue-49593-box-never.rs#fallback: pass -> [missing] (J1)
  • [ui] tests/ui/coercion/coerce-issue-49593-box-never.rs#nofallback: pass -> [missing] (J1)
  • [ui] tests/ui/coercion/coerce-to-bang.rs: pass -> [missing] (J1)
  • [ui] tests/ui/never/never-type-method-call-15207.rs: pass -> [missing] (J1)
  • [ui] tests/ui/never_type/defaulted-never-note.rs#e2021: [missing] -> pass (J1)
  • [ui] tests/ui/never_type/defaulted-never-note.rs#e2024: [missing] -> pass (J1)
  • [ui] tests/ui/never_type/defaulted-never-note.rs#fallback: pass -> [missing] (J1)
  • [ui] tests/ui/never_type/defaulted-never-note.rs#nofallback: pass -> [missing] (J1)
  • [ui] tests/ui/never_type/diverging-fallback-no-leak.rs#fallback: pass -> [missing] (J1)
  • [ui] tests/ui/never_type/diverging-fallback-no-leak.rs#nofallback: pass -> [missing] (J1)
  • [ui] tests/ui/never_type/diverging-fallback-unconstrained-return.rs#e2021: [missing] -> pass (J1)
  • [ui] tests/ui/never_type/diverging-fallback-unconstrained-return.rs#e2024: [missing] -> pass (J1)
  • [ui] tests/ui/never_type/diverging-fallback-unconstrained-return.rs#fallback: pass -> [missing] (J1)
  • [ui] tests/ui/never_type/diverging-fallback-unconstrained-return.rs#nofallback: pass -> [missing] (J1)
  • [ui] tests/ui/never_type/fallback-closure-ret.rs#e2021: [missing] -> pass (J1)
  • [ui] tests/ui/never_type/fallback-closure-ret.rs#e2024: [missing] -> pass (J1)
  • [ui] tests/ui/never_type/fallback-closure-ret.rs#fallback: pass -> [missing] (J1)
  • [ui] tests/ui/never_type/fallback-closure-ret.rs#nofallback: pass -> [missing] (J1)
  • [ui] tests/ui/never_type/fallback-closure-wrap.rs#e2021: [missing] -> pass (J1)
  • [ui] tests/ui/never_type/fallback-closure-wrap.rs#e2024: [missing] -> pass (J1)
  • [ui] tests/ui/never_type/fallback-closure-wrap.rs#fallback: pass -> [missing] (J1)
  • [ui] tests/ui/never_type/fallback-closure-wrap.rs#nofallback: pass -> [missing] (J1)
  • [ui] tests/ui/never_type/impl_trait_fallback.rs: pass -> [missing] (J1)
  • [ui] tests/ui/never_type/impl_trait_fallback2.rs: pass -> [missing] (J1)
  • [ui] tests/ui/never_type/impl_trait_fallback3.rs: pass -> [missing] (J1)
  • [ui] tests/ui/never_type/impl_trait_fallback4.rs: pass -> [missing] (J1)
  • [ui] tests/ui/never_type/never-type-method-call-15207.rs: [missing] -> pass (J1)
  • [ui] tests/ui/never_type/never-value-fallback-issue-66757.rs#fallback: pass -> [missing] (J1)
  • [ui] tests/ui/never_type/never-value-fallback-issue-66757.rs#nofallback: pass -> [missing] (J1)
  • [ui] tests/ui/never_type/try_from.rs: pass -> [missing] (J1)
  • convert::into_as_try_into: [missing] -> pass (J3)

Additionally, 106 doctest diffs were found. These are ignored, as they are noisy.

Job group index

Test dashboard

Run

cargo run --manifest-path src/ci/citool/Cargo.toml -- \
    test-dashboard 83e49b75e7daf827e4390ae0ccbcb0d0e2c96493 --output-dir test-dashboard

And then open test-dashboard/index.html in your browser to see an overview of all executed tests.

Job duration changes

  1. dist-apple-various: 3403.0s -> 4382.0s (+28.8%)
  2. dist-i686-msvc: 8005.8s -> 10249.0s (+28.0%)
  3. dist-arm-linux-gnueabi: 6401.0s -> 4939.4s (-22.8%)
  4. test-various: 6095.3s -> 7013.8s (+15.1%)
  5. dist-s390x-linux: 4742.9s -> 5439.1s (+14.7%)
  6. x86_64-rust-for-linux: 2701.4s -> 3089.5s (+14.4%)
  7. aarch64-apple: 9404.5s -> 10698.4s (+13.8%)
  8. aarch64-gnu-llvm-20-2: 2239.5s -> 2540.1s (+13.4%)
  9. pr-check-1: 1682.5s -> 1902.9s (+13.1%)
  10. x86_64-gnu-tools: 3284.1s -> 3684.2s (+12.2%)
How to interpret the job duration changes?

Job durations can vary a lot, based on the actual runner instance
that executed the job, system noise, invalidated caches, etc. The table above is provided
mostly for t-infra members, for simpler debugging of potential CI slow-downs.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (83e49b7): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

This benchmark run did not return any relevant results for this metric.

Max RSS (memory usage)

Results (primary -4.7%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-4.7% [-4.7%, -4.7%] 1
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -4.7% [-4.7%, -4.7%] 1

Cycles

This benchmark run did not return any relevant results for this metric.

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 467.615s -> 469.131s (0.32%)
Artifact size: 386.75 MiB -> 386.75 MiB (-0.00%)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merged-by-bors This PR was explicitly merged by bors. rollup A PR which is a rollup S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants