Skip to content

Rollup of 17 pull requests - #163043

Merged
rust-bors[bot] merged 41 commits into
rust-lang:mainfrom
mu001999:rollup-8Az6J7a
Sep 20, 2026
Merged

rust-bors[bot] merged 41 commits into
rust-lang:mainfrom
mu001999:rollup-8Az6J7a

Conversation

@mu001999

Copy link
Copy Markdown
Member

Successful merges:

r? @ghost

Create a similar rollup

bb1yd and others added 30 commits June 28, 2026 20:33
rust-analyzer has a query for this, so we want to use it there. I don't know if using a query for this will be a perf win for rustc, but rust-analyzer already has this query for other reasons, so it feels a waste to not use it.
Previously we would trigger on

1. `unsafe { 1, 2, 3 }` and suggest `[ { 1, 2, 3 ]` (sic!)
2. `'label: { 1, 2, 3 }` and suggest `[: { 1, 2, 3 ]` (sic!)
3. `X::<{ 1, 2, 3 }>` and suggest `X::<[ 1, 2, 3]>` (wrong)
4. `|| -> i32 { 1, 2, 3 }` and suggest `|| -> i32 [ 1, 2, 3 ]` (wrong)
5. `await { 1, 2, 3 }` and suggest `await [ 1, 2, 3 ]` (wrong)

Moreover, stop looking for identifiers after the `{` as that case can no
longer be reached anyway as `maybe_recover_bad_struct_literal_path`
will always snatch it first.
When in a method trying to access `Self` on its own, suggest `self`.
When in any assoc fn trying to access `Self()`, suggest `Self { fields }` or using an enum variant. When enum has no variants, mention it.
```
error[E0061]: this method takes 0 arguments but 1 argument was supplied
  --> $DIR/shadowed-intrinsic-method.rs:18:7
   |
LL |     a.borrow(());
   |       ^^^^^^ -- unexpected argument of type `()`
   |
note: the `borrow` call is resolved to the method in `std::borrow::Borrow`, shadowing the method of the same name on the inherent impl for `A`
  --> $DIR/shadowed-intrinsic-method.rs:18:7
   |
LL | use std::borrow::Borrow;
   |     ------------------- `std::borrow::Borrow` imported here
...
LL |     a.borrow(());
   |       ^^^^^^ refers to `std::borrow::Borrow::borrow`
note: method defined here
  --> $SRC_DIR/core/src/borrow.rs:LL:COL
help: you might have meant to call the other method; you can use the fully-qualified path to call it explicitly
   |
LL -     a.borrow(());
LL +     A::borrow(&mut a, ());
   |
help: remove the extra argument
   |
LL -     a.borrow(());
LL +     a.borrow();
   |
```

Account for inherent methods

Tweak wording on "other methods available" note

Handle correct gramar in the face of a single other option, or many.
Use ModId more for visibility checks from TypeckRootCtxt. This just
simplifies things a bit and adds consistency.
We generally expect Visibility to have ModId or LocalModId, so it seems
good to restrict the impls as such. There is just one error path needing
adjustment to check that we actually have a ModId. It should be okay
since, if it is not a module, an error will be emitted elsewhere.
Especially in adjust_ident_and_get_scope and is_accessible_from.
…leExt

* First pass at windows::fs::FileExt.seek_read_exact()
* First pass at windows::fs::FileExt.seek_write_all()
* Fix function signature in seek_read_exact(), duh
* First pass at tests for .seek_read_exact(), seek_write_all()
* Whitespace fix
* Use hypothetical seek_read_exact_seek_write_all feature also for .seek_read_exact()
* Tracking issues 162868
* Oops, fix seek_write_all() doc example, was using write_all_at() still
* Add mocked test for windows FileExt trait
* Spelling fixes
* Expand test for windows FileExt trait to include almost all scenarios
* Split three tests out of file_test_windows_fileext_trait()
* Remove old versions of those 3 tests
* Split remaining file_test_windows_fileext_trait() into case 4, 5
* More test cleanup, always test expected_offset where possible
* Test read first for consistency
* Use same doctsring examples as seek_read(), seek_write()
* Missing period
* Oops: actually call _exact(), _all() methods in case 2, 3
* Add missing seek_read_exact_seek_write_all feature flags in doc examples
…limiter, r=jackh726

Make let-else respect macro_rules expr metavariable grouping

Fixes rust-lang#147899
Better account for `Self` that might be a typo of `self`

When in a method trying to access `Self` on its own, suggest `self`. When in any assoc fn trying to access `Self()`, suggest `Self { fields }` or using an enum variant. When enum has no variants, mention it.

Fix rust-lang#91525.
…op, r=jackh726

fix const_item_mutation lint to use needs_drop instead of has_dtor

Description:
The const_item_mutation lint was only checking if the outer type has a direct Drop impl (has_dtor). But if a field inside the type has a Drop impl, that drop logic can also observe the mutation — so the warning should be suppressed in that case too.

This fixes a false positive where the lint would warn on code like:

```O.inner.val = 42;```

even when Inner has a Drop impl that prints the value — meaning the mutation IS observable and the warning is wrong.

Fix: replace has_dtor check with needs_drop, which checks the whole type including all fields inside it.
… r=jackh726

Provide a `supertrait_def_ids()` function in rustc_type_ir's interner

rust-analyzer has a query for this, so we want to use it there. I don't know if using a query for this will be a perf win for rustc, but rust-analyzer already has this query for other reasons, so it feels a waste to not use it.

r? types
…-145558, r=jackh726

Do not suppress the fn item uniqueness note for late bound lifetimes

Fixes rust-lang#145558 `same_type_modulo_infer` compared the bound regions by identity, so the note was suppressed for late bound lifetimes and anonymizing the binders fixes it.
@rust-bors rust-bors Bot 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 Sep 20, 2026
@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Sep 20, 2026
Rollup of 17 pull requests

Successful merges:

 - #158515 (Make let-else respect macro_rules expr metavariable grouping)
 - #160028 (Better account for `Self` that might be a typo of `self`)
 - #160097 (fix const_item_mutation lint to use needs_drop instead of has_dtor)
 - #161435 (Provide a `supertrait_def_ids()` function in rustc_type_ir's interner)
 - #161894 (Do not suppress the fn item uniqueness note for late bound lifetimes)
 - #162990 (post GH comment on types nominations)
 - #153662 (Suggest fully qualified path on method name collision)
 - #154665 (add safety section for mem::zeroed)
 - #159787 (Prefer ModId in more places)
 - #162700 ( Remove incorrect parse error recovery code that mistakes `as` casts for the long removed type ascription)
 - #162705 (Trigger "C array" parse error recovery in far fewer cases)
 - #162875 (Add .seek_read_exact(), .seek_write_all() to std::os::windows::fs::FileExt)
 - #162988 (recover `true` and `false` in type position as `bool`)
 - #162995 (Constify `impl FromStr for NonZero<T>`)
 - #163006 (Use `end_point` for trailing brace in `let...else` diagnostics)
 - #163007 (add Dir::try_clone)
 - #163039 (Use verbose suggestion for parenthetical `Fn` notation and fully-qualified path on ambiguous assoc item)
@rust-log-analyzer

Copy link
Copy Markdown
Collaborator

The job test-i686-msvc failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)
Caused by:
  unable to update registry `crates-io`

Caused by:
  download of wa/si/wasip1 failed

Caused by:
  [6] Could not resolve hostname (Could not resolve host: index.crates.io)
Bootstrap failed while executing `test --stage 2 --skip=compiler --skip=src`
Currently active steps:
compile::Assemble { target_compiler: Compiler { stage: 2, host: x86_64-pc-windows-msvc, forced_compiler: false } } at src\bootstrap\src\core\build_steps\test.rs:1947
compile::Rustc { target: x86_64-pc-windows-msvc, build_compiler: Compiler { stage: 1, host: x86_64-pc-windows-msvc, forced_compiler: false }, crates: [] } at src\bootstrap\src\core\build_steps\compile.rs:2328
compile::Std { target: x86_64-pc-windows-msvc, build_compiler: Compiler { stage: 1, host: x86_64-pc-windows-msvc, forced_compiler: false }, crates: [], force_recompile: false, extra_rust_args: [], is_for_mir_opt_tests: false } at src\bootstrap\src\core\build_steps\compile.rs:1064
Build completed unsuccessfully in 0:39:37
make: *** [Makefile:115: ci-msvc-py] Error 1
  local time: Sun Sep 20 05:49:51 CUT 2026
  network time: Sun, 20 Sep 2026 05:49:51 GMT
##[error]Process completed with exit code 2.
##[group]Run echo "disk usage:"
echo "disk usage:"

@rust-bors rust-bors Bot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Sep 20, 2026
@rust-bors

rust-bors Bot commented Sep 20, 2026

Copy link
Copy Markdown
Contributor

💔 Test for 585d413 failed: CI. Failed job:

@mu001999

Copy link
Copy Markdown
Member Author

Seems suspicious failure

@bors retry

@rust-bors rust-bors Bot 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 Sep 20, 2026
@JonathanBrouwer

Copy link
Copy Markdown
Member

Trying commonly failed jobs
@bors try jobs=dist-various-1,test-various,test-x86_64-gnu-aux,test-x86_64-gnu-llvm-21-3,test-x86_64-msvc-1,test-aarch64-apple-1,test-aarch64-apple-2,test-x86_64-mingw-1,test-i686-msvc,test-armhf-gnu

@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Sep 20, 2026
Rollup of 17 pull requests


try-job: dist-various-1
try-job: test-various
try-job: test-x86_64-gnu-aux
try-job: test-x86_64-gnu-llvm-21-3
try-job: test-x86_64-msvc-1
try-job: test-aarch64-apple-1
try-job: test-aarch64-apple-2
try-job: test-x86_64-mingw-1
try-job: test-i686-msvc
try-job: test-armhf-gnu
@rust-bors

rust-bors Bot commented Sep 20, 2026

Copy link
Copy Markdown
Contributor

☀️ Try build successful (CI)
Build commit: 9e5b2c4 (9e5b2c41afb0762598df0f12c9f1fd2755278e46)
Base parent: feaadee (feaadeeaca7db0594da854e7c8c07495341c7439)

@rust-bors

This comment has been minimized.

@rust-bors rust-bors Bot added merged-by-bors This PR was explicitly merged by bors. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Sep 20, 2026
@rust-bors

rust-bors Bot commented Sep 20, 2026

Copy link
Copy Markdown
Contributor

☀️ Test successful - CI
Approved by: mu001999
Duration: 3h 14m 5s
Pushing fc7358c to main...

@rust-bors
rust-bors Bot merged commit fc7358c into rust-lang:main Sep 20, 2026
15 checks passed
@rustbot rustbot added this to the 1.100.0 milestone Sep 20, 2026
@github-actions

Copy link
Copy Markdown
Contributor
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 feaadee (parent) -> fc7358c (this PR)

Test differences

Show 1271 test diffs

Stage 1

  • [ui (polonius)] tests/ui/fn/fn-item-type-note-late-bound-145558.rs: [missing] -> pass (J0)
  • [ui (polonius)] tests/ui/let-else/detect-invisible-delimiter.rs: [missing] -> pass (J0)
  • [ui (polonius)] tests/ui/methods/shadowed-intrinsic-method.rs: [missing] -> pass (J0)
  • [ui (polonius)] tests/ui/parser/issues/true-false-type-issue-162947.rs: [missing] -> pass (J0)
  • [ui (polonius)] tests/ui/parser/let-else-fullwidth-brace.rs: [missing] -> pass (J0)
  • [ui] tests/ui/fn/fn-item-type-note-late-bound-145558.rs: [missing] -> pass (J4)
  • [ui] tests/ui/let-else/detect-invisible-delimiter.rs: [missing] -> pass (J4)
  • [ui] tests/ui/methods/shadowed-intrinsic-method.rs: [missing] -> pass (J4)
  • [ui] tests/ui/parser/issues/true-false-type-issue-162947.rs: [missing] -> pass (J4)
  • [ui] tests/ui/parser/let-else-fullwidth-brace.rs: [missing] -> pass (J4)
  • fs::tests::test_dir_clone: [missing] -> pass (J5)

Stage 2

  • fs::tests::test_dir_clone: [missing] -> pass (J1)
  • fs::tests::file_test_io_seek_read_exact_write_all: [missing] -> pass (J2)
  • fs::tests::file_test_windows_fileext_trait_case_1: [missing] -> pass (J2)
  • fs::tests::file_test_windows_fileext_trait_case_2: [missing] -> pass (J2)
  • fs::tests::file_test_windows_fileext_trait_case_3: [missing] -> pass (J2)
  • fs::tests::file_test_windows_fileext_trait_case_4: [missing] -> pass (J2)
  • fs::tests::file_test_windows_fileext_trait_case_5: [missing] -> pass (J2)
  • [ui] tests/ui/fn/fn-item-type-note-late-bound-145558.rs: [missing] -> pass (J3)
  • [ui] tests/ui/let-else/detect-invisible-delimiter.rs: [missing] -> pass (J3)
  • [ui] tests/ui/methods/shadowed-intrinsic-method.rs: [missing] -> pass (J3)
  • [ui] tests/ui/parser/issues/true-false-type-issue-162947.rs: [missing] -> pass (J3)
  • [ui] tests/ui/parser/let-else-fullwidth-brace.rs: [missing] -> pass (J3)

Additionally, 1248 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 fc7358c9223bbf6b30741438fc8588dad7e4671c --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. test-x86_64-rust-for-linux: 33m 2s -> 56m 22s (+70.6%)
  2. test-x86_64-gnu-llvm-22-2: 59m 55s -> 1h 39m (+65.2%)
  3. test-x86_64-msvc-1: 1h 47m -> 2h 53m (+61.3%)
  4. test-x86_64-gnu-gcc: 48m 2s -> 1h 17m (+61.1%)
  5. dist-loongarch64-linux: 1h 24m -> 2h 8m (+52.9%)
  6. test-arm-android: 1h 9m -> 1h 43m (+47.6%)
  7. dist-sparcv9-solaris: 1h 12m -> 1h 41m (+40.2%)
  8. dist-x86_64-musl: 2h 22m -> 1h 28m (-37.7%)
  9. test-x86_64-gnu-miri: 45m 13s -> 1h 2m (+37.7%)
  10. test-x86_64-gnu-debug: 1h 34m -> 2h 5m (+33.6%)
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
Copy Markdown
Collaborator

Finished benchmarking commit (fc7358c): comparison URL.

Overall result: ✅ improvements - no action needed

@rustbot label: -perf-regression

Instruction count

Our most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-0.5% [-0.6%, -0.4%] 2
All ❌✅ (primary) - - 0

Max RSS (memory usage)

This perf run didn't have relevant results for this metric.

Cycles

Results (primary -2.2%, secondary 2.9%)

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)
2.9% [2.8%, 3.0%] 2
Improvements ✅
(primary)
-2.2% [-2.2%, -2.2%] 1
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -2.2% [-2.2%, -2.2%] 1

Binary size

Results (primary -0.1%, secondary -0.1%)

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)
-0.1% [-0.2%, -0.0%] 86
Improvements ✅
(secondary)
-0.1% [-0.2%, -0.0%] 55
All ❌✅ (primary) -0.1% [-0.2%, -0.0%] 86

Bootstrap: 502.551s -> 500.549s (-0.40%)
Artifact size: 406.86 MiB -> 408.70 MiB (0.45%)

@rust-bors

rust-bors Bot commented Sep 20, 2026

Copy link
Copy Markdown
Contributor

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#158515 Make let-else respect macro_rules expr metavariable grouping afdc98c57de482767ee583638bf0f57665f4c0b7
(link)
#160028 Better account for Self that might be a typo of self 56a204ee6412bfd3e8e1c23120641eb81dfd33dd
(link)
#160097 fix const_item_mutation lint to use needs_drop instead of h… c7f9076ea4e781dfcdf6033541c1b019ec9f4fd7
(link)
#161435 Provide a supertrait_def_ids() function in rustc_type_ir'… 1ef0812120357defa7e0205e1269bda8e3b7ba44
(link)
#161894 Do not suppress the fn item uniqueness note for late bound … a35b6573fa11a365945672bcff38d5113d8e4528
(link)
#162990 post GH comment on types nominations 4c7573d57c31f6ceb6ad309a83595bb8a3953631
(link)
#153662 Suggest fully qualified path on method name collision 3cc3f9bf10c8b8677f30a344ef514d9c19dcef42
(link)
#154665 add safety section for mem::zeroed bb51d0f176b21dad88131b4c3179584a8a6cf399
(link)
#159787 Prefer ModId in more places f6b86105220367cb4b65fc966f8af68acb8fbe96
(link)
#162700 Remove incorrect parse error recovery code that mistakes `… ebe380bed0ee27fe21a406818196514b738ee858
(link)
#162705 Trigger "C array" parse error recovery in far fewer cases 4caba849ef07d02528a667202f3c9371c4aa5fa4
(link)
#162875 Add .seek_read_exact(), .seek_write_all() to std::os::windo… b183a76c3379a8c70f475b9c962981c948d1d532
(link)
#162988 recover true and false in type position as bool 3bd532a971d22026cc75d4a8ca5b2e8e75d0c6bc
(link)
#162995 Constify impl FromStr for NonZero<T> 1cbda119f0dd061d4a0d20996e75d1221e6a19a9
(link)
#163006 Use end_point for trailing brace in let...else diagnost… 4d715729357b5a36247cfe32449de295e8b990a3
(link)
#163007 add Dir::try_clone 3ddf2e595fb5a40444ee2e6be8691390e97ffe5b
(link)
#163039 Use verbose suggestion for parenthetical Fn notation and … 3da00034876995fa3d59e76a3a3cf740b6574b6f
(link)

parent commit: feaadeeaca

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

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

Labels

A-meta Area: Issues & PRs about the rust-lang/rust repository itself merged-by-bors This PR was explicitly merged by bors. O-windows Operating system: Windows rollup A PR which is a rollup T-clippy Relevant to the Clippy team. 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. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver)

Projects

None yet

Development

Successfully merging this pull request may close these issues.