Add target checking to #[register_tool]#157377
Conversation
|
Some changes occurred in compiler/rustc_attr_parsing |
This comment has been minimized.
This comment has been minimized.
10dede4 to
2a28ba8
Compare
This comment has been minimized.
This comment has been minimized.
| #[register_tool(xyz)] | ||
| //~^ WARN crate-level attribute should be an inner attribute | ||
| unreachable!(); | ||
| } |
There was a problem hiding this comment.
Can this be an error? I notice crate level attrs are basically allowed anywhere, I'd like that not to be the case with a new crate level attribute if I can help it.
This comment has been minimized.
This comment has been minimized.
|
The reason that this is a warning is because it historically was. When we initially wrote the attribute parsers the first goal was preserving behavior. I think it makes sense to change this tho, and I think the time has come that for all unstable attributes we should change this. I'll open a PR tomorrow |
|
📋 This PR cannot be approved because it has merge conflicts. Please resolve the conflicts and try again. |
2a28ba8 to
957e505
Compare
|
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. |
|
@bors r=mejrs |
…ol, r=mejrs Add target checking to `#[register_tool]` r? @mejrs
r? @mejrs