-
Notifications
You must be signed in to change notification settings - Fork 12.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Diagnostic namespace #111780
Diagnostic namespace #111780
Conversation
r? @b-naber (rustbot has picked a reviewer for you, use r? to override) |
These commits modify the If this was unintentional then you should revert the changes before this PR is merged. |
This comment has been minimized.
This comment has been minimized.
921fe57
to
7945dbb
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
65fe21b
to
da399fc
Compare
d48d0d3
to
2408bc6
Compare
I've rebased this on top of #112086 to resolve @petrochenkov concerns. Merging this PR needs to wait till #112086 has landed. |
2408bc6
to
08744dc
Compare
To just leave that as comment here: I'm on vacation for the next weeks, so I likely won't be able to update the PR for potential conflicts in that time. Hopefully the name resolution fix is merged when I'm back. If necessary I will fix conflicts after I'm back |
This comment was marked as resolved.
This comment was marked as resolved.
5faf10b
to
1ed72d9
Compare
I've removed the relevant changes for the linting from the PR, but I left the feature gating in place as it's just a local addition to the feature gate pass and it seems to fit there quite well. If that's wrong I will happily move it back as well, but I assume the main problem with the other change was the addition of the @rustbot reviewer |
This comment has been minimized.
This comment has been minimized.
1ed72d9
to
07fd242
Compare
This comment has been minimized.
This comment has been minimized.
07fd242
to
2f55a69
Compare
error: cannot find attribute `diagnostic` in this scope | ||
--> $DIR/requires_path.rs:3:3 | ||
| | ||
LL | #[diagnostic] | ||
| ^^^^^^^^^^ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Before stabilization of the namespace, we'll want to customize this error to be something along the lines of "#[diagnostic]
needs to be followed by one of *
".
Yes, that's fine too. @rustbot author |
15a263e
to
93d76d2
Compare
r=me after addressing #111780 (comment) and squashing commits. |
Co-authored-by: est31 <est31@users.noreply.github.com> Co-authored-by: Esteban Kuber <estebank@users.noreply.github.com> Co-authored-by: Vadim Petrochenkov <vadim.petrochenkov@gmail.com>
93d76d2
to
5b57666
Compare
Thanks! |
☀️ Test successful - checks-actions |
Finished benchmarking commit (317ec04): comparison URL. Overall result: no relevant changes - no action needed@rustbot label: -perf-regression Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)ResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 650.875s -> 650.027s (-0.13%) |
This PR implements the basic infrastructure for accepting the
#[diagnostic]
attribute tool namespace as specified in rust-lang/rfcs#3368. Note: This RFC is not merged yet, but it seems like it will be accepted soon. I open this PR early on to get feedback on the actual implementation as soon as possible. This hopefully enables getting at least the diagnostic namespace to stable rust "soon", so that crates do not need to bump their MSRV if we stabilize actual attributes in this namespace.This PR only adds infrastructure accept attributes from this namespace, it does not add any specific attribute. Therefore the compiler will emit a lint warning for each attribute that's actually used. This namespace is added behind a feature flag, so it will be only available on a nightly compiler for now.
cc @estebank as they've supported me in planing, specifying and implementing this feature.