Skip to content

Commit 4702a9a

Browse files
committed
Only allow foreign functions for SIMD FFI
1 parent d5471a7 commit 4702a9a

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

compiler/rustc_passes/src/check_attr.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -369,10 +369,8 @@ impl CheckAttrVisitor<'tcx> {
369369
Target::Fn
370370
| Target::Method(MethodKind::Trait { body: true } | MethodKind::Inherent) => true,
371371

372-
// Allow foreign items for SIMD FFI.
373-
Target::ForeignFn | Target::ForeignMod | Target::ForeignTy | Target::ForeignStatic => {
374-
true
375-
}
372+
// Allow foreign functions for SIMD FFI.
373+
Target::ForeignFn => true,
376374

377375
// FIXME: #[target_feature] was previously erroneously allowed on statements and some
378376
// crates used this, so only emit a warning.

0 commit comments

Comments
 (0)