diff options
Diffstat (limited to 'src/test/ui/target-feature/invalid-attribute.rs')
| -rw-r--r-- | src/test/ui/target-feature/invalid-attribute.rs | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/src/test/ui/target-feature/invalid-attribute.rs b/src/test/ui/target-feature/invalid-attribute.rs index 46680336632..63b1951a716 100644 --- a/src/test/ui/target-feature/invalid-attribute.rs +++ b/src/test/ui/target-feature/invalid-attribute.rs @@ -26,7 +26,7 @@ unsafe fn foo() {} #[target_feature(enable = "sse2")] //~^ ERROR `#[target_feature(..)]` can only be applied to `unsafe` functions -//~| NOTE can only be applied to `unsafe` functions +//~| NOTE see issue #69098 fn bar() {} //~^ NOTE not an `unsafe` function @@ -65,9 +65,26 @@ trait Baz { } #[target_feature(enable = "sse2")] unsafe fn test() {} +trait Quux { + fn foo(); +} + +impl Quux for Foo { + #[target_feature(enable = "sse2")] + //~^ ERROR `#[target_feature(..)]` can only be applied to `unsafe` functions + //~| NOTE see issue #69098 + fn foo() {} + //~^ NOTE not an `unsafe` function +} + fn main() { unsafe { foo(); bar(); } + #[target_feature(enable = "sse2")] + //~^ ERROR `#[target_feature(..)]` can only be applied to `unsafe` functions + //~| NOTE see issue #69098 + || {}; + //~^ NOTE not an `unsafe` function } |
