]>
git.proxmox.com Git - rustc.git/blob - src/test/ui/target-feature/invalid-attribute.rs
15 #![warn(unused_attributes)]
17 #[target_feature = "+sse2"]
18 //~^ ERROR malformed `target_feature` attribute
19 #[target_feature(enable = "foo")]
20 //~^ ERROR not valid for this target
21 //~| NOTE `foo` is not valid for this target
22 #[target_feature(bar)]
23 //~^ ERROR malformed `target_feature` attribute
24 #[target_feature(disable = "baz")]
25 //~^ ERROR malformed `target_feature` attribute
28 #[target_feature(enable = "sse2")]
29 //~^ ERROR `#[target_feature(..)]` can only be applied to `unsafe` functions
30 //~| NOTE see issue #69098
32 //~^ NOTE not an `unsafe` function
34 #[target_feature(enable = "sse2")]
35 //~^ ERROR attribute should be applied to a function
37 //~^ NOTE not a function
39 #[target_feature(enable = "sse2")]
40 //~^ ERROR attribute should be applied to a function
42 //~^ NOTE not a function
44 #[target_feature(enable = "sse2")]
45 //~^ ERROR attribute should be applied to a function
47 //~^ NOTE not a function
49 #[target_feature(enable = "sse2")]
50 //~^ ERROR attribute should be applied to a function
52 //~^ NOTE not a function
54 #[target_feature(enable = "sse2")]
55 //~^ ERROR attribute should be applied to a function
57 //~^ NOTE not a function
62 #[target_feature(enable = "sse2")]
63 //~^ ERROR attribute should be applied to a function
65 //~^ NOTE not a function
68 //~^ ERROR: cannot use `#[inline(always)]`
69 #[target_feature(enable = "sse2")]
77 #[target_feature(enable = "sse2")]
78 //~^ ERROR `#[target_feature(..)]` can only be applied to `unsafe` functions
79 //~| NOTE see issue #69098
81 //~^ NOTE not an `unsafe` function
85 #[target_feature(enable = "sse2")]
86 //~^ ERROR attribute should be applied to a function
91 //~^^^^ NOTE not a function
93 #[target_feature(enable = "sse2")]
94 //~^ ERROR attribute should be applied to a function
96 //~^ NOTE not a function