@@ -146,6 +146,9 @@ impl<'tcx> CheckAttrVisitor<'tcx> {
146
146
Attribute :: Parsed ( AttributeKind :: Fundamental ) => {
147
147
// FIXME: add validation
148
148
}
149
+ & Attribute :: Parsed ( AttributeKind :: AllowIncoherentImpl ( attr_span) ) => {
150
+ self . check_allow_incoherent_impl ( attr_span, span, target)
151
+ }
149
152
Attribute :: Parsed ( AttributeKind :: Confusables { first_span, .. } ) => {
150
153
self . check_confusables ( * first_span, target) ;
151
154
}
@@ -309,9 +312,6 @@ impl<'tcx> CheckAttrVisitor<'tcx> {
309
312
[ sym:: rustc_must_implement_one_of, ..] => self . check_must_be_applied_to_trait ( attr. span ( ) , span, target) ,
310
313
[ sym:: collapse_debuginfo, ..] => self . check_collapse_debuginfo ( attr, span, target) ,
311
314
[ sym:: must_not_suspend, ..] => self . check_must_not_suspend ( attr, span, target) ,
312
- [ sym:: rustc_allow_incoherent_impl, ..] => {
313
- self . check_allow_incoherent_impl ( attr, span, target)
314
- }
315
315
[ sym:: rustc_has_incoherent_inherent_impls, ..] => {
316
316
self . check_has_incoherent_inherent_impls ( attr, span, target)
317
317
}
@@ -1491,11 +1491,11 @@ impl<'tcx> CheckAttrVisitor<'tcx> {
1491
1491
}
1492
1492
}
1493
1493
1494
- fn check_allow_incoherent_impl ( & self , attr : & Attribute , span : Span , target : Target ) {
1494
+ fn check_allow_incoherent_impl ( & self , attr_span : Span , span : Span , target : Target ) {
1495
1495
match target {
1496
1496
Target :: Method ( MethodKind :: Inherent ) => { }
1497
1497
_ => {
1498
- self . dcx ( ) . emit_err ( errors:: AllowIncoherentImpl { attr_span : attr . span ( ) , span } ) ;
1498
+ self . dcx ( ) . emit_err ( errors:: AllowIncoherentImpl { attr_span, span } ) ;
1499
1499
}
1500
1500
}
1501
1501
}
0 commit comments