Skip to content

Enable #[diagnostic::on_const] for local impls#154609

Merged
rust-bors[bot] merged 3 commits intorust-lang:mainfrom
mejrs:local_on_const
Apr 8, 2026
Merged

Enable #[diagnostic::on_const] for local impls#154609
rust-bors[bot] merged 3 commits intorust-lang:mainfrom
mejrs:local_on_const

Conversation

@mejrs
Copy link
Copy Markdown
Contributor

@mejrs mejrs commented Mar 30, 2026

Previously this attribute only did something if it was on a foreign impl.

@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. labels Mar 30, 2026
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Mar 30, 2026

r? @fmease

rustbot has assigned @fmease.
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: compiler
  • compiler expanded to 69 candidates
  • Random selection from 13 candidates

fn eq(&self, _other: &X) -> bool {
true
}
}
Copy link
Copy Markdown
Contributor Author

@mejrs mejrs Mar 30, 2026

Choose a reason for hiding this comment

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

@rust-bors

This comment has been minimized.

@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Apr 5, 2026

This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

@rust-bors

This comment has been minimized.

Copy link
Copy Markdown
Member

@fmease fmease left a comment

Choose a reason for hiding this comment

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

Thanks and sorry for the delay! @bors r+ rollup

View changes since this review

@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors bot commented Apr 7, 2026

📌 Commit 4bc2a55 has been approved by fmease

It is now in the queue for this repository.

@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 Apr 7, 2026
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Apr 7, 2026
Enable `#[diagnostic::on_const]` for local impls

Previously this attribute only did something if it was on a foreign impl.
@JonathanBrouwer
Copy link
Copy Markdown
Contributor

@bors r-
#154951 (comment)

@rust-bors rust-bors bot 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-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Apr 7, 2026
@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors bot commented Apr 7, 2026

This pull request was unapproved.

This PR was contained in a rollup (#154951), which was unapproved.

@mejrs
Copy link
Copy Markdown
Contributor Author

mejrs commented Apr 7, 2026

@JonathanBrouwer (Cc @oli-obk) it is the combination with #154930 that makes this PR's new UI tests fail.

Aside from adjusting code in typeck, the rollup can be fixed by simply adding #![feature(const_trait_impl)] to the ui tests. I can make that change here or we can merge this PR ahead of #154930 and have that PR do it.

Let me know what you'd prefer.

@JonathanBrouwer
Copy link
Copy Markdown
Contributor

JonathanBrouwer commented Apr 7, 2026

#154930 also just got r-'ed so we can r+ this again then
@bors r=fmease

@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors bot commented Apr 7, 2026

📌 Commit 4bc2a55 has been approved by fmease

It is now in the queue for this repository.

@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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Apr 7, 2026
rust-bors bot pushed a commit that referenced this pull request Apr 8, 2026
Rollup of 4 pull requests

Successful merges:

 - #154460 (Deduplication: Pulled common logic out from lower_const_arg_struct)
 - #154609 (Enable `#[diagnostic::on_const]` for local impls)
 - #154678 (Introduce #[diagnostic::on_move] on `Rc`)
 - #154902 (rustdoc: Inherit inline attributes for declarative macros)
@rust-bors rust-bors bot merged commit a1f9587 into rust-lang:main Apr 8, 2026
11 checks passed
@rustbot rustbot added this to the 1.96.0 milestone Apr 8, 2026
rust-timer added a commit that referenced this pull request Apr 8, 2026
Rollup merge of #154609 - mejrs:local_on_const, r=fmease

Enable `#[diagnostic::on_const]` for local impls

Previously this attribute only did something if it was on a foreign impl.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants