Uh oh!
There was an error while loading. Please reload this page.
Permit {This} in diagnostic attribute format literals - #155662
Conversation
rustbot
commented
Apr 22, 2026
Some changes occurred in compiler/rustc_attr_parsing |
rustbot
commented
Apr 22, 2026
rustbot has assigned @petrochenkov. Use Why was this reviewer chosen?The reviewer was selected based on:
|
ab6b807 to
f3f19ddCompare
This comment has been minimized.
This comment has been minimized.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
4749ea0 to
ae94821Comparerustbot
commented
Apr 23, 2026
Some changes occurred in compiler/rustc_passes/src/check_attr.rs |
This comment has been minimized.
This comment has been minimized.
petrochenkov
commented
Apr 24, 2026
@bors r+ |
This comment has been minimized.
This comment has been minimized.
rustbot
commented
Apr 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
commented
Apr 24, 2026
@bors r=petrochenkov |
This comment has been minimized.
This comment has been minimized.
Uh oh!
There was an error while loading. Please reload this page.
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 7c61a35 (parent) -> 80729d7 (this PR) Test differencesShow 16 test diffsStage 1
Stage 2
Additionally, 14 doctest diffs were found. These are ignored, as they are noisy. Job group index
Test dashboardRun cargo run --manifest-path src/ci/citool/Cargo.toml -- \
test-dashboard 80729d7ce0ec05aef7a33d9892484cfd5cf34675 --output-dir test-dashboardAnd then open Job duration changes
How to interpret the job duration changes?Job durations can vary a lot, based on the actual runner instance |
rust-timer
commented
Apr 25, 2026
Finished benchmarking commit (80729d7): comparison URL. Overall result: ✅ improvements - no action needed@rustbot label: -perf-regression Instruction countOur most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.
Max RSS (memory usage)Results (secondary -1.9%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (secondary -8.5%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeThis perf run didn't have relevant results for this metric. Bootstrap: 491.842s -> 492.349s (0.10%) |
My motivation was that yesterday I wanted to write something like this and reference
$namein the string literal.That is (as far as I can tell) impossible or at least very unergonomic. This adds the ability to just reference the name of the item the attribute is on. I imagine that's useful for use inside macros generally, so it's also added for some other attributes.
The affected attributes are all unstable, it is not implemented for diagnostic::on_unimplemented (will do in its own PR).
Note that
{This}is already usable in#[rustc_on_unimplemented], so this does not implement it but just enables some more.This PR also migrates one lint away from AttributeLintKind, and improves the messages for that lint.