about summary refs log tree commit diff
path: root/compiler
diff options
context:
space:
mode:
authorFolkert <folkert@folkertdev.nl>2024-07-23 16:02:32 +0200
committerFolkert <folkert@folkertdev.nl>2024-07-27 12:56:20 +0200
commita3bb0104ff929674e9d315d9ebec8324f88f367f (patch)
tree20ad0147d069aa7dcdfb77ac183a23894a2ed883 /compiler
parentc6a166bac269eda77b595fdc8ff7290e1372c147 (diff)
allow `#[target_feature]` on `#[naked]` functions
Diffstat (limited to 'compiler')
-rw-r--r--compiler/rustc_error_codes/src/error_codes/E0736.md1
-rw-r--r--compiler/rustc_passes/src/check_attr.rs2
2 files changed, 1 insertions, 2 deletions
diff --git a/compiler/rustc_error_codes/src/error_codes/E0736.md b/compiler/rustc_error_codes/src/error_codes/E0736.md
index 4660d610744..cb7633b7068 100644
--- a/compiler/rustc_error_codes/src/error_codes/E0736.md
+++ b/compiler/rustc_error_codes/src/error_codes/E0736.md
@@ -5,7 +5,6 @@ Notable attributes that are incompatible with `#[naked]` are:
 
 * `#[inline]`
 * `#[track_caller]`
-* `#[target_feature]`
 * `#[test]`, `#[ignore]`, `#[should_panic]`
 
 Erroneous code example:
diff --git a/compiler/rustc_passes/src/check_attr.rs b/compiler/rustc_passes/src/check_attr.rs
index ba0dbfbac12..879cae7a94c 100644
--- a/compiler/rustc_passes/src/check_attr.rs
+++ b/compiler/rustc_passes/src/check_attr.rs
@@ -423,7 +423,6 @@ impl<'tcx> CheckAttrVisitor<'tcx> {
         //
         // * `#[inline]`
         // * `#[track_caller]`
-        // * `#[target_feature]`
         // * `#[test]`, `#[ignore]`, `#[should_panic]`
         //
         // NOTE: when making changes to this list, check that `error_codes/E0736.md` remains accurate
@@ -452,6 +451,7 @@ impl<'tcx> CheckAttrVisitor<'tcx> {
             sym::instruction_set,
             // code generation
             sym::cold,
+            sym::target_feature,
             // documentation
             sym::doc,
         ];