]> git.lizzy.rs Git - rust.git/blob - src/test/ui/target-feature-wrong.stderr
Auto merge of #62748 - luca-barbieri:optimize-refcell-borrow, r=RalfJung
[rust.git] / src / test / ui / target-feature-wrong.stderr
1 error: malformed `target_feature` attribute input
2   --> $DIR/target-feature-wrong.rs:16:1
3    |
4 LL | #[target_feature = "+sse2"]
5    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: must be of the form: `#[target_feature(enable = "name")]`
6
7 error: the feature named `foo` is not valid for this target
8   --> $DIR/target-feature-wrong.rs:18:18
9    |
10 LL | #[target_feature(enable = "foo")]
11    |                  ^^^^^^^^^^^^^^ `foo` is not valid for this target
12
13 error: malformed `target_feature` attribute input
14   --> $DIR/target-feature-wrong.rs:21:18
15    |
16 LL | #[target_feature(bar)]
17    |                  ^^^ help: must be of the form: `enable = ".."`
18
19 error: malformed `target_feature` attribute input
20   --> $DIR/target-feature-wrong.rs:23:18
21    |
22 LL | #[target_feature(disable = "baz")]
23    |                  ^^^^^^^^^^^^^^^ help: must be of the form: `enable = ".."`
24
25 error: `#[target_feature(..)]` can only be applied to `unsafe` functions
26   --> $DIR/target-feature-wrong.rs:27:1
27    |
28 LL | #[target_feature(enable = "sse2")]
29    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can only be applied to `unsafe` functions
30 ...
31 LL | fn bar() {}
32    | ----------- not an `unsafe` function
33
34 error: attribute should be applied to a function
35   --> $DIR/target-feature-wrong.rs:33:1
36    |
37 LL | #[target_feature(enable = "sse2")]
38    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
39 LL |
40 LL | mod another {}
41    | -------------- not a function
42
43 error: cannot use `#[inline(always)]` with `#[target_feature]`
44   --> $DIR/target-feature-wrong.rs:38:1
45    |
46 LL | #[inline(always)]
47    | ^^^^^^^^^^^^^^^^^
48
49 error: aborting due to 7 previous errors
50