Skip to content

Port diagnostic attributes#151558

Merged
rust-bors[bot] merged 19 commits intorust-lang:mainfrom
mejrs:port_on_unimplemented
Feb 24, 2026
Merged

Port diagnostic attributes#151558
rust-bors[bot] merged 19 commits intorust-lang:mainfrom
mejrs:port_on_unimplemented

Conversation

@mejrs
Copy link
Contributor

@mejrs mejrs commented Jan 23, 2026

View all comments

Ports all the diagnostic attributes: on_const, on_unimplemented and rustc_on_unimplemented.

I thought about migrating them one by one but that would leave a lot of code duplicated. So this PR looks big but it's mostly a lot of moving code around with slight modifications.

r? @JonathanBrouwer

cc @jdonszelmann feel free to review if you want, not sure which of you wants it.

@rustbot rustbot added A-attributes Area: Attributes (`#[…]`, `#![…]`) S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jan 23, 2026
@rust-log-analyzer

This comment has been minimized.

@JonathanBrouwer
Copy link
Contributor

@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

@rust-bors

This comment has been minimized.

rust-bors bot pushed a commit that referenced this pull request Jan 23, 2026
@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Jan 23, 2026
@rust-bors
Copy link
Contributor

rust-bors bot commented Jan 24, 2026

☀️ Try build successful (CI)
Build commit: e5e5a65 (e5e5a6588240040eb81cfb52d8b9c3281547ef47, parent: d222ddc4d90743dfc1e53b610be8fc9d95893d2c)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (e5e5a65): comparison URL.

Overall result: ❌ regressions - no action needed

Benchmarking this pull request means it may be perf-sensitive – we'll automatically label it not fit for rolling up. You can override this, but we strongly advise not to, due to possible changes in compiler perf.

@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.

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

Max RSS (memory usage)

Results (primary -1.7%, 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)
3.9% [3.9%, 3.9%] 1
Improvements ✅
(primary)
-1.7% [-1.7%, -1.7%] 1
Improvements ✅
(secondary)
-4.2% [-4.2%, -4.2%] 1
All ❌✅ (primary) -1.7% [-1.7%, -1.7%] 1

Cycles

Results (secondary -4.3%)

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
Improvements ✅
(secondary)
-4.3% [-4.9%, -3.0%] 3
All ❌✅ (primary) - - 0

Binary size

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

Bootstrap: 470.684s -> 471.14s (0.10%)
Artifact size: 383.48 MiB -> 383.64 MiB (0.04%)

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Jan 24, 2026
@fmease fmease changed the title Port diagnosttic::unimplemented Port diagnosttic::on_unimplemented Jan 24, 2026
@rust-bors

This comment has been minimized.

@rustbot rustbot added A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. A-meta Area: Issues & PRs about the rust-lang/rust repository itself A-query-system Area: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html) A-translation Area: Translation infrastructure, and migrating existing diagnostics to SessionDiagnostic PG-exploit-mitigations Project group: Exploit mitigations T-release Relevant to the release subteam, which will review and decide on the PR/issue. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver) labels Feb 2, 2026
@mejrs mejrs force-pushed the port_on_unimplemented branch from 314a3ab to a1841a0 Compare February 2, 2026 12:03
@rust-log-analyzer

This comment has been minimized.

@rust-bors

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@rust-bors

This comment has been minimized.

@mejrs mejrs force-pushed the port_on_unimplemented branch from f85b181 to 3e1d86b Compare February 14, 2026 17:44
@mejrs mejrs force-pushed the port_on_unimplemented branch from 98ab94b to 0b14bd4 Compare February 24, 2026 09:56
@rustbot
Copy link
Collaborator

rustbot commented Feb 24, 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.

@mejrs
Copy link
Contributor Author

mejrs commented Feb 24, 2026

had to rebase on github.com//pull/152985, unlucky that merged an hour before i guess

@rustbot ready

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Feb 24, 2026
@JonathanBrouwer
Copy link
Contributor

@bors r=jdonszelmann,jonathanbrouwer rollup

@rust-bors
Copy link
Contributor

rust-bors bot commented Feb 24, 2026

📌 Commit 0b14bd4 has been approved by jdonszelmann,jonathanbrouwer

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 Feb 24, 2026
rust-bors bot pushed a commit that referenced this pull request Feb 24, 2026
…uwer

Rollup of 15 pull requests

Successful merges:

 - #152176 (Neon fast path for str::contains)
 - #152657 (std: move `exit` out of PAL)
 - #152841 (Streamline `QueryVTableUnerased` into `GetQueryVTable`)
 - #152845 (Skip `tidy` in PR CI jobs not dedicated to running `tidy`)
 - #152897 (Add optional json logging)
 - #153009 (Remove `rustc_feedable_queries` and `define_feedable` macros.)
 - #151558 (Port diagnostic attributes)
 - #152492 (mGCA: Enforce WF element types for array valtrees)
 - #152888 (Fix async drop glue MIR bug)
 - #152988 (Port `#[register_tool]` to the new attribute system)
 - #153018 (`unused_must_use` lint improvements)
 - #153023 (Update books)
 - #153033 (Clarify how "ensure" queries check whether they can skip execution)
 - #153043 (fix error on missing value for -C flags)
 - #153045 (rustc-dev-guide subtree update)

Failed merges:

 - #153032 (Fix attribute parser and kind names.)
@rust-bors rust-bors bot merged commit c82c805 into rust-lang:main Feb 24, 2026
11 checks passed
@rustbot rustbot added this to the 1.95.0 milestone Feb 24, 2026
rust-timer added a commit that referenced this pull request Feb 24, 2026
Rollup merge of #151558 - mejrs:port_on_unimplemented, r=jdonszelmann,jonathanbrouwer

Port diagnostic attributes

*[View all comments](https://triagebot.infra.rust-lang.org/gh-comments/rust-lang/rust/pull/151558)*

Ports all the diagnostic attributes: on_const, on_unimplemented and rustc_on_unimplemented.

I thought about migrating them one by one but that would leave a lot of code duplicated. So this PR looks big but it's mostly a lot of moving code around with slight modifications.

r? @JonathanBrouwer

cc @jdonszelmann feel free to review if you want, not sure which of you wants it.
github-actions bot pushed a commit to rust-lang/rustc-dev-guide that referenced this pull request Mar 2, 2026
…uwer

Rollup of 15 pull requests

Successful merges:

 - rust-lang/rust#152176 (Neon fast path for str::contains)
 - rust-lang/rust#152657 (std: move `exit` out of PAL)
 - rust-lang/rust#152841 (Streamline `QueryVTableUnerased` into `GetQueryVTable`)
 - rust-lang/rust#152845 (Skip `tidy` in PR CI jobs not dedicated to running `tidy`)
 - rust-lang/rust#152897 (Add optional json logging)
 - rust-lang/rust#153009 (Remove `rustc_feedable_queries` and `define_feedable` macros.)
 - rust-lang/rust#151558 (Port diagnostic attributes)
 - rust-lang/rust#152492 (mGCA: Enforce WF element types for array valtrees)
 - rust-lang/rust#152888 (Fix async drop glue MIR bug)
 - rust-lang/rust#152988 (Port `#[register_tool]` to the new attribute system)
 - rust-lang/rust#153018 (`unused_must_use` lint improvements)
 - rust-lang/rust#153023 (Update books)
 - rust-lang/rust#153033 (Clarify how "ensure" queries check whether they can skip execution)
 - rust-lang/rust#153043 (fix error on missing value for -C flags)
 - rust-lang/rust#153045 (rustc-dev-guide subtree update)

Failed merges:

 - rust-lang/rust#153032 (Fix attribute parser and kind names.)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-attributes Area: Attributes (`#[…]`, `#![…]`) A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. A-meta Area: Issues & PRs about the rust-lang/rust repository itself A-query-system Area: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html) A-translation Area: Translation infrastructure, and migrating existing diagnostics to SessionDiagnostic PG-exploit-mitigations Project group: Exploit mitigations 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-release Relevant to the release subteam, which will review and decide on the PR/issue. 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.

7 participants