@@ -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
}
@@ -319,9 +322,6 @@ impl<'tcx> CheckAttrVisitor<'tcx> {
319
322
[ sym:: rustc_must_implement_one_of, ..] => self . check_must_be_applied_to_trait ( attr. span ( ) , span, target) ,
320
323
[ sym:: collapse_debuginfo, ..] => self . check_collapse_debuginfo ( attr, span, target) ,
321
324
[ sym:: must_not_suspend, ..] => self . check_must_not_suspend ( attr, span, target) ,
322
- [ sym:: rustc_allow_incoherent_impl, ..] => {
323
- self . check_allow_incoherent_impl ( attr, span, target)
324
- }
325
325
[ sym:: rustc_has_incoherent_inherent_impls, ..] => {
326
326
self . check_has_incoherent_inherent_impls ( attr, span, target)
327
327
}
@@ -1498,11 +1498,11 @@ impl<'tcx> CheckAttrVisitor<'tcx> {
1498
1498
}
1499
1499
}
1500
1500
1501
- fn check_allow_incoherent_impl ( & self , attr : & Attribute , span : Span , target : Target ) {
1501
+ fn check_allow_incoherent_impl ( & self , attr_span : Span , span : Span , target : Target ) {
1502
1502
match target {
1503
1503
Target :: Method ( MethodKind :: Inherent ) => { }
1504
1504
_ => {
1505
- self . dcx ( ) . emit_err ( errors:: AllowIncoherentImpl { attr_span : attr . span ( ) , span } ) ;
1505
+ self . dcx ( ) . emit_err ( errors:: AllowIncoherentImpl { attr_span, span } ) ;
1506
1506
}
1507
1507
}
1508
1508
}
0 commit comments