Skip to content

Commit cd4d899

Browse files
committed
make all parsed rustc attributes error on duplicate
1 parent fe34b17 commit cd4d899

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

compiler/rustc_attr_parsing/src/attributes/rustc_internal.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ pub(crate) struct RustcLintOptTyParser;
145145

146146
impl<S: Stage> NoArgsAttributeParser<S> for RustcLintOptTyParser {
147147
const PATH: &[Symbol] = &[sym::rustc_lint_opt_ty];
148-
const ON_DUPLICATE: OnDuplicate<S> = OnDuplicate::Warn;
148+
const ON_DUPLICATE: OnDuplicate<S> = OnDuplicate::Error;
149149
const ALLOWED_TARGETS: AllowedTargets = AllowedTargets::AllowList(&[Allow(Target::Struct)]);
150150
const CREATE: fn(Span) -> AttributeKind = |_| AttributeKind::RustcLintOptTy;
151151
}
@@ -154,7 +154,7 @@ pub(crate) struct RustcLintQueryInstabilityParser;
154154

155155
impl<S: Stage> NoArgsAttributeParser<S> for RustcLintQueryInstabilityParser {
156156
const PATH: &[Symbol] = &[sym::rustc_lint_query_instability];
157-
const ON_DUPLICATE: OnDuplicate<S> = OnDuplicate::Warn;
157+
const ON_DUPLICATE: OnDuplicate<S> = OnDuplicate::Error;
158158
const ALLOWED_TARGETS: AllowedTargets = AllowedTargets::AllowList(&[
159159
Allow(Target::Fn),
160160
Allow(Target::Method(MethodKind::Inherent)),

0 commit comments

Comments
 (0)