diff options
Diffstat (limited to 'tests/ui/target-feature/invalid-attribute.rs')
| -rw-r--r-- | tests/ui/target-feature/invalid-attribute.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/ui/target-feature/invalid-attribute.rs b/tests/ui/target-feature/invalid-attribute.rs index 9ef7a686d25..d13098c3a6a 100644 --- a/tests/ui/target-feature/invalid-attribute.rs +++ b/tests/ui/target-feature/invalid-attribute.rs @@ -19,13 +19,16 @@ extern "Rust" {} #[target_feature = "+sse2"] //~^ ERROR malformed `target_feature` attribute +//~| NOTE expected this to be a list #[target_feature(enable = "foo")] //~^ ERROR not valid for this target //~| NOTE `foo` is not valid for this target #[target_feature(bar)] //~^ ERROR malformed `target_feature` attribute +//~| NOTE expected this to be of the form `enable = "..."` #[target_feature(disable = "baz")] //~^ ERROR malformed `target_feature` attribute +//~| NOTE expected this to be of the form `enable = "..."` unsafe fn foo() {} #[target_feature(enable = "sse2")] @@ -117,3 +120,8 @@ fn main() { || {}; //~^ NOTE not a function } + +#[target_feature(enable = "+sse2")] +//~^ ERROR `+sse2` is not valid for this target +//~| NOTE `+sse2` is not valid for this target +unsafe fn hey() {} |
