File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
compiler/rustc_passes/src Expand file tree Collapse file tree 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> {
715715 attrs : & [ Attribute ] ,
716716 ) {
717717 match target {
718- Target :: Fn => {
718+ Target :: Method ( MethodKind :: Trait { body : true } | MethodKind :: Inherent )
719+ | Target :: Fn => {
719720 // `#[target_feature]` is not allowed in lang items.
720721 if let Some ( ( lang_item, _) ) = hir:: lang_items:: extract ( attrs)
721722 // Calling functions with `#[target_feature]` is
@@ -732,7 +733,6 @@ impl<'tcx> CheckAttrVisitor<'tcx> {
732733 } ) ;
733734 }
734735 }
735- Target :: Method ( MethodKind :: Trait { body : true } | MethodKind :: Inherent ) => { }
736736 // FIXME: #[target_feature] was previously erroneously allowed on statements and some
737737 // crates used this, so only emit a warning.
738738 Target :: Statement => {
You can’t perform that action at this time.
0 commit comments