Make OnDuplicate::Error the default for attributes#155308
Make OnDuplicate::Error the default for attributes#155308JonathanBrouwer wants to merge 2 commits intorust-lang:mainfrom
OnDuplicate::Error the default for attributes#155308Conversation
|
Some changes occurred in compiler/rustc_attr_parsing |
| error: multiple `no_core` attributes | ||
| --> $DIR/malformed-no-std.rs:13:1 | ||
| | | ||
| LL | #![no_core("bar")] |
There was a problem hiding this comment.
for valid input to no_core, so when there's not another error already, did multiple attributes give an error or did it pass silently. In which case: is this a breaking change?
There was a problem hiding this comment.
Yes this PR changes no_core from warn to err, but no_core is unstable so we can do this.
Note that the test has a feature gate.
Note that this PR changes this for all unstable attributes: 887a3f3
|
|
||
| impl<S: Stage> NoArgsAttributeParser<S> for NoCoreParser { | ||
| const PATH: &[Symbol] = &[sym::no_core]; | ||
| const ON_DUPLICATE: OnDuplicate<S> = OnDuplicate::Warn; |
There was a problem hiding this comment.
yea, I think this is a warn->err regression
|
Reminder, once the PR becomes ready for a review, use |
|
@rustbot ready |
This comment has been minimized.
This comment has been minimized.
cbfae9a to
6e5e096
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. |
This makes two changes, in separate commits for reviewability:
OnDuplicate::Warnto error.OnDuplicate::Errorthe default and removes the explicitON_DUPLICATEfor ones that currently already errorr? @jdonszelmann