Change api of formatting diagnostic attribute strings.#154858
Merged
rust-bors[bot] merged 2 commits intorust-lang:mainfrom Apr 6, 2026
Merged
Change api of formatting diagnostic attribute strings.#154858rust-bors[bot] merged 2 commits intorust-lang:mainfrom
rust-bors[bot] merged 2 commits intorust-lang:mainfrom
Conversation
Collaborator
|
Some changes occurred in compiler/rustc_hir/src/attrs |
Collaborator
|
r? @chenyukang rustbot has assigned @chenyukang. Use Why was this reviewer chosen?The reviewer was selected based on:
|
Contributor
|
r? me |
JonathanBrouwer
approved these changes
Apr 6, 2026
Contributor
jieyouxu
reviewed
Apr 6, 2026
| ) -> OnUnimplementedNote { | ||
| ) -> CustomDiagnostic { | ||
| let this = &args.this; | ||
| info!("eval({self:?}, this={this}, options={condition_options:?}, args ={args:?})"); |
Member
There was a problem hiding this comment.
Question: does this need to be info! instead of say, debug!?
Contributor
There was a problem hiding this comment.
Hmmm yeah debug! is definitely more appropriate here, oops
@mejrs could you open a new pr to change it?
rust-timer
added a commit
that referenced
this pull request
Apr 6, 2026
Rollup merge of #154858 - mejrs:diagnostic_eval, r=JonathanBrouwer Change api of formatting diagnostic attribute strings. As of recently a lot of people are creating new diagnostic attributes, but skipping its methods and doing things like `directive.message.as_ref().map(|e| e.1.format(&args)),` instead, but that skips the `tracing` instrumentation of diagnostic attribute formatting. The first commit forces people to use the right method for that. The name `OnUnimplementedNote` also hasn't been accurate for some time.
JonathanBrouwer
added a commit
to JonathanBrouwer/rust
that referenced
this pull request
Apr 6, 2026
…uwer Use debug! instead of info! re: rust-lang#154858 (comment) r? @JonathanBrouwer cc @jieyouxu
rust-timer
added a commit
that referenced
this pull request
Apr 6, 2026
Rollup merge of #154898 - mejrs:info_to_debug, r=JonathanBrouwer Use debug! instead of info! re: #154858 (comment) r? @JonathanBrouwer cc @jieyouxu
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
As of recently a lot of people are creating new diagnostic attributes, but skipping its methods and doing things like
directive.message.as_ref().map(|e| e.1.format(&args)),instead, but that skips thetracinginstrumentation of diagnostic attribute formatting. The first commit forces people to use the right method for that.The name
OnUnimplementedNotealso hasn't been accurate for some time.