This repository was archived by the owner on May 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +39
-0
lines changed Expand file tree Collapse file tree 2 files changed +39
-0
lines changed Original file line number Diff line number Diff line change
1
+ // This checks that the attribute validation ICE in issue #105594 doesn't
2
+ // recur.
3
+ //
4
+ // ignore-thumbv8m.base
5
+ #![ feature( cmse_nonsecure_entry) ]
6
+
7
+ fn main ( ) { }
8
+
9
+ #[ track_caller] //~ ERROR attribute should be applied to a function
10
+ static _A: ( ) = ( ) ;
11
+
12
+ #[ cmse_nonsecure_entry] //~ ERROR attribute should be applied to a function
13
+ static _B: ( ) = ( ) ; //~| ERROR #[cmse_nonsecure_entry]` is only valid for targets
Original file line number Diff line number Diff line change
1
+ error[E0739]: attribute should be applied to a function definition
2
+ --> $DIR/issue-105594-invalid-attr-validation.rs:9:1
3
+ |
4
+ LL | #[track_caller]
5
+ | ^^^^^^^^^^^^^^^
6
+ LL | static _A: () = ();
7
+ | ------------------- not a function definition
8
+
9
+ error: attribute should be applied to a function definition
10
+ --> $DIR/issue-105594-invalid-attr-validation.rs:12:1
11
+ |
12
+ LL | #[cmse_nonsecure_entry]
13
+ | ^^^^^^^^^^^^^^^^^^^^^^^
14
+ LL | static _B: () = ();
15
+ | ------------------- not a function definition
16
+
17
+ error[E0775]: `#[cmse_nonsecure_entry]` is only valid for targets with the TrustZone-M extension
18
+ --> $DIR/issue-105594-invalid-attr-validation.rs:12:1
19
+ |
20
+ LL | #[cmse_nonsecure_entry]
21
+ | ^^^^^^^^^^^^^^^^^^^^^^^
22
+
23
+ error: aborting due to 3 previous errors
24
+
25
+ Some errors have detailed explanations: E0739, E0775.
26
+ For more information about an error, try `rustc --explain E0739`.
You can’t perform that action at this time.
0 commit comments