@@ -4,65 +4,62 @@ error[E0433]: failed to resolve: use of unresolved module or unlinked crate `a`
4
4
LL | #[::a]
5
5
| ^ use of unresolved module or unlinked crate `a`
6
6
7
- error[E0736]: attribute incompatible with `#[unsafe( naked)]`
8
- --> $DIR/naked-invalid-attr.rs:56:3
7
+ error: `#[naked]` attribute cannot be used on crates
8
+ --> $DIR/naked-invalid-attr.rs:4:1
9
9
|
10
- LL | #[::a]
11
- | ^^^ the `::a` attribute is incompatible with `#[unsafe(naked)]`
12
- ...
13
- LL | #[unsafe(naked)]
14
- | ---------------- function marked with `#[unsafe(naked)]` here
15
-
16
- error: attribute should be applied to a function definition
17
- --> $DIR/naked-invalid-attr.rs:13:1
10
+ LL | #![unsafe(naked)]
11
+ | ^^^^^^^^^^^^^^^^^
18
12
|
19
- LL | #[unsafe(naked)]
20
- | ^^^^^^^^^^^^^^^^
21
- LL | #[repr(C)]
22
- LL | / struct S {
23
- LL | | #[unsafe(naked)]
24
- LL | | a: u32,
25
- LL | | b: u32,
26
- LL | | }
27
- | |_- not a function definition
13
+ = help: `#[naked]` can only be applied to functions
28
14
29
- error: attribute should be applied to a function definition
30
- --> $DIR/naked-invalid-attr.rs:16 :5
15
+ error: `#[naked]` attribute cannot be used on foreign functions
16
+ --> $DIR/naked-invalid-attr.rs:9 :5
31
17
|
32
18
LL | #[unsafe(naked)]
33
19
| ^^^^^^^^^^^^^^^^
34
- LL | a: u32,
35
- | ------ not a function definition
20
+ |
21
+ = help: `#[naked]` can be applied to methods, functions
36
22
37
- error: attribute should be applied to a function definition
38
- --> $DIR/naked-invalid-attr.rs:51:5
23
+ error: `#[naked]` attribute cannot be used on structs
24
+ --> $DIR/naked-invalid-attr.rs:13:1
25
+ |
26
+ LL | #[unsafe(naked)]
27
+ | ^^^^^^^^^^^^^^^^
28
+ |
29
+ = help: `#[naked]` can only be applied to functions
30
+
31
+ error: `#[naked]` attribute cannot be used on struct fields
32
+ --> $DIR/naked-invalid-attr.rs:16:5
39
33
|
40
34
LL | #[unsafe(naked)]
41
35
| ^^^^^^^^^^^^^^^^
42
- LL | || {};
43
- | ----- not a function definition
36
+ |
37
+ = help: `#[naked]` can only be applied to functions
44
38
45
- error: attribute should be applied to a function definition
39
+ error: `#[naked]` attribute cannot be used on required trait methods
46
40
--> $DIR/naked-invalid-attr.rs:22:5
47
41
|
48
42
LL | #[unsafe(naked)]
49
43
| ^^^^^^^^^^^^^^^^
50
- LL | extern "C" fn invoke(&self);
51
- | ---------------------------- not a function definition
44
+ |
45
+ = help: `#[naked]` can be applied to functions, inherent methods, provided trait methods, trait methods in impl blocks
52
46
53
- error: attribute should be applied to a function definition
54
- --> $DIR/naked-invalid-attr.rs:9 :5
47
+ error: `#[naked]` attribute cannot be used on closures
48
+ --> $DIR/naked-invalid-attr.rs:51 :5
55
49
|
56
50
LL | #[unsafe(naked)]
57
51
| ^^^^^^^^^^^^^^^^
58
- LL | fn f();
59
- | ------- not a function definition
52
+ |
53
+ = help: `#[naked]` can be applied to methods, functions
60
54
61
- error: attribute should be applied to a function definition
62
- --> $DIR/naked-invalid-attr.rs:4:1
55
+ error[E0736] : attribute incompatible with `#[unsafe(naked)]`
56
+ --> $DIR/naked-invalid-attr.rs:56:3
63
57
|
64
- LL | #![unsafe(naked)]
65
- | ^^^^^^^^^^^^^^^^^ cannot be applied to crates
58
+ LL | #[::a]
59
+ | ^^^ the `::a` attribute is incompatible with `#[unsafe(naked)]`
60
+ ...
61
+ LL | #[unsafe(naked)]
62
+ | ---------------- function marked with `#[unsafe(naked)]` here
66
63
67
64
error: aborting due to 8 previous errors
68
65
0 commit comments