@@ -4,65 +4,62 @@ error[E0433]: failed to resolve: use of unresolved module or unlinked crate `a`
44LL | #[::a]
55 | ^ use of unresolved module or unlinked crate `a`
66
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
99 |
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+ | ^^^^^^^^^^^^^^^^^
1812 |
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 be applied to functions
2814
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
3117 |
3218LL | #[unsafe(naked)]
3319 | ^^^^^^^^^^^^^^^^
34- LL | a: u32,
35- | ------ not a function definition
20+ |
21+ = help: `#[naked]` can be applied to methods, functions
3622
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 be applied to functions
30+
31+ error: `#[naked]` attribute cannot be used on struct fields
32+ --> $DIR/naked-invalid-attr.rs:16:5
3933 |
4034LL | #[unsafe(naked)]
4135 | ^^^^^^^^^^^^^^^^
42- LL | || {};
43- | ----- not a function definition
36+ |
37+ = help: `#[naked]` can be applied to functions
4438
45- error: attribute should be applied to a function definition
39+ error: `#[naked]` attribute cannot be used on required trait methods
4640 --> $DIR/naked-invalid-attr.rs:22:5
4741 |
4842LL | #[unsafe(naked)]
4943 | ^^^^^^^^^^^^^^^^
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
5246
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
5549 |
5650LL | #[unsafe(naked)]
5751 | ^^^^^^^^^^^^^^^^
58- LL | fn f();
59- | ------- not a function definition
52+ |
53+ = help: `#[naked]` can be applied to methods, functions
6054
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
6357 |
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
6663
6764error: aborting due to 8 previous errors
6865
0 commit comments