diff options
| author | Folkert <folkert@folkertdev.nl> | 2024-07-23 16:02:32 +0200 |
|---|---|---|
| committer | Folkert <folkert@folkertdev.nl> | 2024-07-27 12:56:20 +0200 |
| commit | a3bb0104ff929674e9d315d9ebec8324f88f367f (patch) | |
| tree | 20ad0147d069aa7dcdfb77ac183a23894a2ed883 /compiler | |
| parent | c6a166bac269eda77b595fdc8ff7290e1372c147 (diff) | |
allow `#[target_feature]` on `#[naked]` functions
Diffstat (limited to 'compiler')
| -rw-r--r-- | compiler/rustc_error_codes/src/error_codes/E0736.md | 1 | ||||
| -rw-r--r-- | compiler/rustc_passes/src/check_attr.rs | 2 |
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, ]; |
