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 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. |
| #[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.
|
☔ The latest upstream changes (presumably #157398) made this pull request unmergeable. Please resolve the merge conflicts. |
|
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 |
r? @mejrs