Skip to content

Report duplicate relaxed bounds during ast lowering - #157642

Merged
rust-bors[bot] merged 3 commits into
rust-lang:mainfrom
oli-obk:dup-relaxed-bounds-ast-lowering
Jun 10, 2026
Merged

Report duplicate relaxed bounds during ast lowering#157642
rust-bors[bot] merged 3 commits into
rust-lang:mainfrom
oli-obk:dup-relaxed-bounds-ast-lowering

Conversation

@oli-obk

Copy link
Copy Markdown
Contributor

Instead of during hir-ty-lowering.

Not sure it is worth erroring on at all, but it's better to do it directly during lowering instead of collecting bounds after the fact.

@rustbot

Copy link
Copy Markdown
Collaborator

HIR ty lowering was modified

cc @fmease

@rustbotrustbot 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. labels Jun 9, 2026
@rustbot

Copy link
Copy Markdown
Collaborator

r? @TaKO8Ki

rustbot has assigned @TaKO8Ki.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: ast_lowering, compiler
  • ast_lowering, compiler expanded to 73 candidates
  • Random selection from 19 candidates

@fmeasefmease assigned fmease and unassigned TaKO8KiJun 9, 2026

@fmeasefmease left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! <3

Some nits, then r=me
@bors rollup

View changes since this review

Comment threadcompiler/rustc_ast_lowering/src/item.rs Outdated
Comment threadcompiler/rustc_ast_lowering/src/lib.rs Outdated
Comment threadcompiler/rustc_ast_lowering/src/lib.rs
Comment threadcompiler/rustc_ast_lowering/src/lib.rs Outdated
Comment threadcompiler/rustc_ast_lowering/src/lib.rs Outdated
Comment threadcompiler/rustc_ast_lowering/src/lib.rs Outdated
@fmeasefmease added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jun 9, 2026
Comment threadcompiler/rustc_ast_lowering/src/lib.rs
@oli-obk
oli-obkforce-pushed the dup-relaxed-bounds-ast-lowering branch from c397555 to 16aa9d0CompareJune 9, 2026 09:03
@oli-obk

Copy link
Copy Markdown
ContributorAuthor

@bors r=fmease

@rust-bors

rust-borsBot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 16aa9d0 has been approved by fmease

It is now in the queue for this repository.

@rust-borsrust-borsBot 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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jun 9, 2026
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request Jun 9, 2026
…ering, r=fmease
Report duplicate relaxed bounds during ast lowering
Instead of during hir-ty-lowering.
Not sure it is worth erroring on at all, but it's better to do it directly during lowering instead of collecting bounds after the fact.
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request Jun 9, 2026
…ering, r=fmease
Report duplicate relaxed bounds during ast lowering
Instead of during hir-ty-lowering.
Not sure it is worth erroring on at all, but it's better to do it directly during lowering instead of collecting bounds after the fact.
rust-borsBot pushed a commit that referenced this pull request Jun 9, 2026
Rollup of 10 pull requests
Successful merges:
- #157335 (bootstrap: Handle dotted table keys when parsing bootstrap.toml)
- #157503 (Disable `tests/debuginfo/pretty-std.rs` `OsString` cdb check)
- #148183 (rustdoc: Test & document `test_harness` code block attribute)
- #156067 (Fix async drop glue for Box<T>)
- #156399 (fix improper ctypes in Znext solver)
- #157410 (Implement rustc_public::CrateDef{,Type} for FieldDef)
- #157605 (Arg splat experiment - syntax impl)
- #157630 (Add multibyte JSON diagnostic regression test)
- #157633 (Reorder `impl` restriction rendering and add bottom margin)
- #157642 (Report duplicate relaxed bounds during ast lowering)
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request Jun 9, 2026
…ering, r=fmease
Report duplicate relaxed bounds during ast lowering
Instead of during hir-ty-lowering.
Not sure it is worth erroring on at all, but it's better to do it directly during lowering instead of collecting bounds after the fact.
jhpratt added a commit to jhpratt/rust that referenced this pull request Jun 9, 2026
…ering, r=fmease
Report duplicate relaxed bounds during ast lowering
Instead of during hir-ty-lowering.
Not sure it is worth erroring on at all, but it's better to do it directly during lowering instead of collecting bounds after the fact.
@jhprattjhpratt mentioned this pull request Jun 9, 2026
rust-borsBot pushed a commit that referenced this pull request Jun 9, 2026
Rollup of 18 pull requests
Successful merges:
- #152852 (Remove driver_lint_caps)
- #157166 (Change type of async context parameter after state transform.)
- #157335 (bootstrap: Handle dotted table keys when parsing bootstrap.toml)
- #157503 (Disable `tests/debuginfo/pretty-std.rs` `OsString` cdb check)
- #157571 (Remove ProcMacro enum from proc macro ABI)
- #148183 (rustdoc: Test & document `test_harness` code block attribute)
- #153847 (Fix marker trait winnowing depending on impl order)
- #156067 (Fix async drop glue for Box<T>)
- #156399 (fix improper ctypes in Znext solver)
- #157338 (Make `Literal::byte_character_value` work with bytes as well)
- #157410 (Implement rustc_public::CrateDef{,Type} for FieldDef)
- #157605 (Arg splat experiment - syntax impl)
- #157630 (Add multibyte JSON diagnostic regression test)
- #157633 (Reorder `impl` restriction rendering and add bottom margin)
- #157642 (Report duplicate relaxed bounds during ast lowering)
- #157652 (fix doc for unicode normalization faq on `casefold` APIs)
- #157661 (Update to ar_archive_writer v0.5.2)
- #157668 (Add test for matches in `rustc_must_match_exhaustively`)
Failed merges:
- #157670 (Rename `errors.rs` file to `diagnostics.rs` (4/N))
@jhprattjhpratt mentioned this pull request Jun 9, 2026
rust-borsBot pushed a commit that referenced this pull request Jun 9, 2026
Rollup of 17 pull requests
Successful merges:
- #157166 (Change type of async context parameter after state transform.)
- #157335 (bootstrap: Handle dotted table keys when parsing bootstrap.toml)
- #157503 (Disable `tests/debuginfo/pretty-std.rs` `OsString` cdb check)
- #157571 (Remove ProcMacro enum from proc macro ABI)
- #148183 (rustdoc: Test & document `test_harness` code block attribute)
- #153847 (Fix marker trait winnowing depending on impl order)
- #156067 (Fix async drop glue for Box<T>)
- #156399 (fix improper ctypes in Znext solver)
- #157338 (Make `Literal::byte_character_value` work with bytes as well)
- #157410 (Implement rustc_public::CrateDef{,Type} for FieldDef)
- #157605 (Arg splat experiment - syntax impl)
- #157630 (Add multibyte JSON diagnostic regression test)
- #157633 (Reorder `impl` restriction rendering and add bottom margin)
- #157642 (Report duplicate relaxed bounds during ast lowering)
- #157652 (fix doc for unicode normalization faq on `casefold` APIs)
- #157661 (Update to ar_archive_writer v0.5.2)
- #157668 (Add test for matches in `rustc_must_match_exhaustively`)
Failed merges:
- #157670 (Rename `errors.rs` file to `diagnostics.rs` (4/N))
rust-borsBot pushed a commit that referenced this pull request Jun 10, 2026
Rollup of 17 pull requests
Successful merges:
- #157166 (Change type of async context parameter after state transform.)
- #157335 (bootstrap: Handle dotted table keys when parsing bootstrap.toml)
- #157503 (Disable `tests/debuginfo/pretty-std.rs` `OsString` cdb check)
- #157571 (Remove ProcMacro enum from proc macro ABI)
- #148183 (rustdoc: Test & document `test_harness` code block attribute)
- #153847 (Fix marker trait winnowing depending on impl order)
- #156067 (Fix async drop glue for Box<T>)
- #156399 (fix improper ctypes in Znext solver)
- #157338 (Make `Literal::byte_character_value` work with bytes as well)
- #157410 (Implement rustc_public::CrateDef{,Type} for FieldDef)
- #157605 (Arg splat experiment - syntax impl)
- #157630 (Add multibyte JSON diagnostic regression test)
- #157633 (Reorder `impl` restriction rendering and add bottom margin)
- #157642 (Report duplicate relaxed bounds during ast lowering)
- #157652 (fix doc for unicode normalization faq on `casefold` APIs)
- #157661 (Update to ar_archive_writer v0.5.2)
- #157668 (Add test for matches in `rustc_must_match_exhaustively`)
Failed merges:
- #157670 (Rename `errors.rs` file to `diagnostics.rs` (4/N))
rust-borsBot pushed a commit that referenced this pull request Jun 10, 2026
Rollup of 17 pull requests
Successful merges:
- #157166 (Change type of async context parameter after state transform.)
- #157335 (bootstrap: Handle dotted table keys when parsing bootstrap.toml)
- #157503 (Disable `tests/debuginfo/pretty-std.rs` `OsString` cdb check)
- #157571 (Remove ProcMacro enum from proc macro ABI)
- #148183 (rustdoc: Test & document `test_harness` code block attribute)
- #153847 (Fix marker trait winnowing depending on impl order)
- #156067 (Fix async drop glue for Box<T>)
- #156399 (fix improper ctypes in Znext solver)
- #157338 (Make `Literal::byte_character_value` work with bytes as well)
- #157410 (Implement rustc_public::CrateDef{,Type} for FieldDef)
- #157605 (Arg splat experiment - syntax impl)
- #157630 (Add multibyte JSON diagnostic regression test)
- #157633 (Reorder `impl` restriction rendering and add bottom margin)
- #157642 (Report duplicate relaxed bounds during ast lowering)
- #157652 (fix doc for unicode normalization faq on `casefold` APIs)
- #157661 (Update to ar_archive_writer v0.5.2)
- #157668 (Add test for matches in `rustc_must_match_exhaustively`)
Failed merges:
- #157670 (Rename `errors.rs` file to `diagnostics.rs` (4/N))
rust-borsBot pushed a commit that referenced this pull request Jun 10, 2026
Rollup of 17 pull requests
Successful merges:
- #157166 (Change type of async context parameter after state transform.)
- #157335 (bootstrap: Handle dotted table keys when parsing bootstrap.toml)
- #157503 (Disable `tests/debuginfo/pretty-std.rs` `OsString` cdb check)
- #157571 (Remove ProcMacro enum from proc macro ABI)
- #148183 (rustdoc: Test & document `test_harness` code block attribute)
- #153847 (Fix marker trait winnowing depending on impl order)
- #156067 (Fix async drop glue for Box<T>)
- #156399 (fix improper ctypes in Znext solver)
- #157338 (Make `Literal::byte_character_value` work with bytes as well)
- #157410 (Implement rustc_public::CrateDef{,Type} for FieldDef)
- #157605 (Arg splat experiment - syntax impl)
- #157630 (Add multibyte JSON diagnostic regression test)
- #157633 (Reorder `impl` restriction rendering and add bottom margin)
- #157642 (Report duplicate relaxed bounds during ast lowering)
- #157652 (fix doc for unicode normalization faq on `casefold` APIs)
- #157661 (Update to ar_archive_writer v0.5.2)
- #157668 (Add test for matches in `rustc_must_match_exhaustively`)
Failed merges:
- #157670 (Rename `errors.rs` file to `diagnostics.rs` (4/N))
rust-borsBot pushed a commit that referenced this pull request Jun 10, 2026
Rollup of 17 pull requests
Successful merges:
- #157166 (Change type of async context parameter after state transform.)
- #157335 (bootstrap: Handle dotted table keys when parsing bootstrap.toml)
- #157503 (Disable `tests/debuginfo/pretty-std.rs` `OsString` cdb check)
- #157571 (Remove ProcMacro enum from proc macro ABI)
- #148183 (rustdoc: Test & document `test_harness` code block attribute)
- #153847 (Fix marker trait winnowing depending on impl order)
- #156067 (Fix async drop glue for Box<T>)
- #156399 (fix improper ctypes in Znext solver)
- #157338 (Make `Literal::byte_character_value` work with bytes as well)
- #157410 (Implement rustc_public::CrateDef{,Type} for FieldDef)
- #157605 (Arg splat experiment - syntax impl)
- #157630 (Add multibyte JSON diagnostic regression test)
- #157633 (Reorder `impl` restriction rendering and add bottom margin)
- #157642 (Report duplicate relaxed bounds during ast lowering)
- #157652 (fix doc for unicode normalization faq on `casefold` APIs)
- #157661 (Update to ar_archive_writer v0.5.2)
- #157668 (Add test for matches in `rustc_must_match_exhaustively`)
Failed merges:
- #157670 (Rename `errors.rs` file to `diagnostics.rs` (4/N))
rust-borsBot pushed a commit that referenced this pull request Jun 10, 2026
Rollup of 17 pull requests
Successful merges:
- #157166 (Change type of async context parameter after state transform.)
- #157335 (bootstrap: Handle dotted table keys when parsing bootstrap.toml)
- #157503 (Disable `tests/debuginfo/pretty-std.rs` `OsString` cdb check)
- #157571 (Remove ProcMacro enum from proc macro ABI)
- #148183 (rustdoc: Test & document `test_harness` code block attribute)
- #153847 (Fix marker trait winnowing depending on impl order)
- #156067 (Fix async drop glue for Box<T>)
- #156399 (fix improper ctypes in Znext solver)
- #157338 (Make `Literal::byte_character_value` work with bytes as well)
- #157410 (Implement rustc_public::CrateDef{,Type} for FieldDef)
- #157605 (Arg splat experiment - syntax impl)
- #157630 (Add multibyte JSON diagnostic regression test)
- #157633 (Reorder `impl` restriction rendering and add bottom margin)
- #157642 (Report duplicate relaxed bounds during ast lowering)
- #157652 (fix doc for unicode normalization faq on `casefold` APIs)
- #157661 (Update to ar_archive_writer v0.5.2)
- #157668 (Add test for matches in `rustc_must_match_exhaustively`)
Failed merges:
- #157670 (Rename `errors.rs` file to `diagnostics.rs` (4/N))
rust-borsBot pushed a commit that referenced this pull request Jun 10, 2026
Rollup of 17 pull requests
Successful merges:
- #157166 (Change type of async context parameter after state transform.)
- #157335 (bootstrap: Handle dotted table keys when parsing bootstrap.toml)
- #157503 (Disable `tests/debuginfo/pretty-std.rs` `OsString` cdb check)
- #157571 (Remove ProcMacro enum from proc macro ABI)
- #148183 (rustdoc: Test & document `test_harness` code block attribute)
- #153847 (Fix marker trait winnowing depending on impl order)
- #156067 (Fix async drop glue for Box<T>)
- #156399 (fix improper ctypes in Znext solver)
- #157338 (Make `Literal::byte_character_value` work with bytes as well)
- #157410 (Implement rustc_public::CrateDef{,Type} for FieldDef)
- #157605 (Arg splat experiment - syntax impl)
- #157630 (Add multibyte JSON diagnostic regression test)
- #157633 (Reorder `impl` restriction rendering and add bottom margin)
- #157642 (Report duplicate relaxed bounds during ast lowering)
- #157652 (fix doc for unicode normalization faq on `casefold` APIs)
- #157661 (Update to ar_archive_writer v0.5.2)
- #157668 (Add test for matches in `rustc_must_match_exhaustively`)
Failed merges:
- #157670 (Rename `errors.rs` file to `diagnostics.rs` (4/N))
rust-borsBot pushed a commit that referenced this pull request Jun 10, 2026
Rollup of 17 pull requests
Successful merges:
- #157166 (Change type of async context parameter after state transform.)
- #157335 (bootstrap: Handle dotted table keys when parsing bootstrap.toml)
- #157503 (Disable `tests/debuginfo/pretty-std.rs` `OsString` cdb check)
- #157571 (Remove ProcMacro enum from proc macro ABI)
- #148183 (rustdoc: Test & document `test_harness` code block attribute)
- #153847 (Fix marker trait winnowing depending on impl order)
- #156067 (Fix async drop glue for Box<T>)
- #156399 (fix improper ctypes in Znext solver)
- #157338 (Make `Literal::byte_character_value` work with bytes as well)
- #157410 (Implement rustc_public::CrateDef{,Type} for FieldDef)
- #157605 (Arg splat experiment - syntax impl)
- #157630 (Add multibyte JSON diagnostic regression test)
- #157633 (Reorder `impl` restriction rendering and add bottom margin)
- #157642 (Report duplicate relaxed bounds during ast lowering)
- #157652 (fix doc for unicode normalization faq on `casefold` APIs)
- #157661 (Update to ar_archive_writer v0.5.2)
- #157668 (Add test for matches in `rustc_must_match_exhaustively`)
Failed merges:
- #157670 (Rename `errors.rs` file to `diagnostics.rs` (4/N))
@rust-bors
rust-borsBot merged commit a1612bf into rust-lang:mainJun 10, 2026
12 checks passed
@rustbotrustbot added this to the 1.98.0 milestone Jun 10, 2026
rust-timer added a commit that referenced this pull request Jun 10, 2026
Rollup merge of #157642 - oli-obk:dup-relaxed-bounds-ast-lowering, r=fmease
Report duplicate relaxed bounds during ast lowering
Instead of during hir-ty-lowering.
Not sure it is worth erroring on at all, but it's better to do it directly during lowering instead of collecting bounds after the fact.
pullBot pushed a commit to Kokoro2336/rust-analyzer that referenced this pull request Jun 11, 2026
Rollup of 17 pull requests
Successful merges:
- rust-lang/rust#157166 (Change type of async context parameter after state transform.)
- rust-lang/rust#157335 (bootstrap: Handle dotted table keys when parsing bootstrap.toml)
- rust-lang/rust#157503 (Disable `tests/debuginfo/pretty-std.rs` `OsString` cdb check)
- rust-lang/rust#157571 (Remove ProcMacro enum from proc macro ABI)
- rust-lang/rust#148183 (rustdoc: Test & document `test_harness` code block attribute)
- rust-lang/rust#153847 (Fix marker trait winnowing depending on impl order)
- rust-lang/rust#156067 (Fix async drop glue for Box<T>)
- rust-lang/rust#156399 (fix improper ctypes in Znext solver)
- rust-lang/rust#157338 (Make `Literal::byte_character_value` work with bytes as well)
- rust-lang/rust#157410 (Implement rustc_public::CrateDef{,Type} for FieldDef)
- rust-lang/rust#157605 (Arg splat experiment - syntax impl)
- rust-lang/rust#157630 (Add multibyte JSON diagnostic regression test)
- rust-lang/rust#157633 (Reorder `impl` restriction rendering and add bottom margin)
- rust-lang/rust#157642 (Report duplicate relaxed bounds during ast lowering)
- rust-lang/rust#157652 (fix doc for unicode normalization faq on `casefold` APIs)
- rust-lang/rust#157661 (Update to ar_archive_writer v0.5.2)
- rust-lang/rust#157668 (Add test for matches in `rustc_must_match_exhaustively`)
Failed merges:
- rust-lang/rust#157670 (Rename `errors.rs` file to `diagnostics.rs` (4/N))
@JonathanBrouwer

Copy link
Copy Markdown
Member

@rust-timer build 4e63d51

@rust-timer

This comment has been minimized.

@rust-timer

Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (4e63d51): comparison URL.

Overall result: ❌ regressions - please read:

Benchmarking means the PR may be perf-sensitive. It's automatically marked not fit for rolling up. Overriding is possible but disadvised: it risks changing compiler perf.

Next, please: If you can, justify the regressions found in this try perf run in writing along with @rustbot label: +perf-regression-triaged. If not, fix the regressions and do another perf run. Neutral or positive results will clear the label automatically.

@bors rollup=never
@rustbot label: -S-waiting-on-perf +perf-regression

Instruction count

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

meanrangecount
Regressions ❌
(primary)
0.2%[0.2%, 0.2%]3
Regressions ❌
(secondary)
--0
Improvements ✅
(primary)
--0
Improvements ✅
(secondary)
--0
All ❌✅ (primary)0.2%[0.2%, 0.2%]3

Max RSS (memory usage)

Results (primary 0.1%, secondary 1.3%)

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

meanrangecount
Regressions ❌
(primary)
2.3%[2.3%, 2.3%]1
Regressions ❌
(secondary)
1.3%[1.3%, 1.3%]1
Improvements ✅
(primary)
-2.2%[-2.2%, -2.2%]1
Improvements ✅
(secondary)
--0
All ❌✅ (primary)0.1%[-2.2%, 2.3%]2

Cycles

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

Binary size

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

Bootstrap: 525.47s -> 518.229s (-1.38%)
Artifact size: 400.80 MiB -> 400.86 MiB (0.01%)

@rustbotrustbot added the perf-regression Performance regression. label Jun 13, 2026
ghaaj pushed a commit to ghaaj/polygrammar that referenced this pull request Aug 7, 2026
Rollup of 17 pull requests
Successful merges:
- rust-lang/rust#157166 (Change type of async context parameter after state transform.)
- rust-lang/rust#157335 (bootstrap: Handle dotted table keys when parsing bootstrap.toml)
- rust-lang/rust#157503 (Disable `tests/debuginfo/pretty-std.rs` `OsString` cdb check)
- rust-lang/rust#157571 (Remove ProcMacro enum from proc macro ABI)
- rust-lang/rust#148183 (rustdoc: Test & document `test_harness` code block attribute)
- rust-lang/rust#153847 (Fix marker trait winnowing depending on impl order)
- rust-lang/rust#156067 (Fix async drop glue for Box<T>)
- rust-lang/rust#156399 (fix improper ctypes in Znext solver)
- rust-lang/rust#157338 (Make `Literal::byte_character_value` work with bytes as well)
- rust-lang/rust#157410 (Implement rustc_public::CrateDef{,Type} for FieldDef)
- rust-lang/rust#157605 (Arg splat experiment - syntax impl)
- rust-lang/rust#157630 (Add multibyte JSON diagnostic regression test)
- rust-lang/rust#157633 (Reorder `impl` restriction rendering and add bottom margin)
- rust-lang/rust#157642 (Report duplicate relaxed bounds during ast lowering)
- rust-lang/rust#157652 (fix doc for unicode normalization faq on `casefold` APIs)
- rust-lang/rust#157661 (Update to ar_archive_writer v0.5.2)
- rust-lang/rust#157668 (Add test for matches in `rustc_must_match_exhaustively`)
Failed merges:
- rust-lang/rust#157670 (Rename `errors.rs` file to `diagnostics.rs` (4/N))
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

perf-regressionPerformance regression.S-waiting-on-borsStatus: Waiting on bors to run and complete tests. Bors will change the label on completion.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants

@oli-obk@rustbot@JonathanBrouwer@rust-timer@fmease@TaKO8Ki