File tree 1 file changed +2
-2
lines changed
compiler/rustc_passes/src
1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -715,7 +715,8 @@ impl<'tcx> CheckAttrVisitor<'tcx> {
715
715
attrs : & [ Attribute ] ,
716
716
) {
717
717
match target {
718
- Target :: Fn => {
718
+ Target :: Method ( MethodKind :: Trait { body : true } | MethodKind :: Inherent )
719
+ | Target :: Fn => {
719
720
// `#[target_feature]` is not allowed in lang items.
720
721
if let Some ( ( lang_item, _) ) = hir:: lang_items:: extract ( attrs)
721
722
// Calling functions with `#[target_feature]` is
@@ -732,7 +733,6 @@ impl<'tcx> CheckAttrVisitor<'tcx> {
732
733
} ) ;
733
734
}
734
735
}
735
- Target :: Method ( MethodKind :: Trait { body : true } | MethodKind :: Inherent ) => { }
736
736
// FIXME: #[target_feature] was previously erroneously allowed on statements and some
737
737
// crates used this, so only emit a warning.
738
738
Target :: Statement => {
You can’t perform that action at this time.
0 commit comments