Skip to content

Commit 6e3a015

Browse files
UI test changes
1 parent 884fb5a commit 6e3a015

File tree

4 files changed

+68
-68
lines changed

4 files changed

+68
-68
lines changed

tests/ui/attributes/unsafe/double-unsafe-attributes.stderr

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,12 @@ help: escape `unsafe` to use it as an identifier
99
LL | #[unsafe(r#unsafe(no_mangle))]
1010
| ++
1111

12+
error: cannot find attribute `r#unsafe` in this scope
13+
--> $DIR/double-unsafe-attributes.rs:1:10
14+
|
15+
LL | #[unsafe(unsafe(no_mangle))]
16+
| ^^^^^^
17+
1218
error: `r#unsafe` is not an unsafe attribute
1319
--> $DIR/double-unsafe-attributes.rs:1:3
1420
|
@@ -17,11 +23,5 @@ LL | #[unsafe(unsafe(no_mangle))]
1723
|
1824
= note: extraneous unsafe is not allowed in attributes
1925

20-
error: cannot find attribute `r#unsafe` in this scope
21-
--> $DIR/double-unsafe-attributes.rs:1:10
22-
|
23-
LL | #[unsafe(unsafe(no_mangle))]
24-
| ^^^^^^
25-
2626
error: aborting due to 3 previous errors
2727

tests/ui/attributes/unsafe/proc-unsafe-attributes.stderr

Lines changed: 40 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -12,46 +12,6 @@ LL | #[unsafe(allow(unsafe(dead_code)))]
1212
|
1313
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
1414

15-
error: `proc_macro` is not an unsafe attribute
16-
--> $DIR/proc-unsafe-attributes.rs:1:3
17-
|
18-
LL | #[unsafe(proc_macro)]
19-
| ^^^^^^ this is not an unsafe attribute
20-
|
21-
= note: extraneous unsafe is not allowed in attributes
22-
23-
error: `proc_macro_derive` is not an unsafe attribute
24-
--> $DIR/proc-unsafe-attributes.rs:7:3
25-
|
26-
LL | #[unsafe(proc_macro_derive(Foo))]
27-
| ^^^^^^ this is not an unsafe attribute
28-
|
29-
= note: extraneous unsafe is not allowed in attributes
30-
31-
error: `proc_macro_attribute` is not an unsafe attribute
32-
--> $DIR/proc-unsafe-attributes.rs:18:3
33-
|
34-
LL | #[unsafe(proc_macro_attribute)]
35-
| ^^^^^^ this is not an unsafe attribute
36-
|
37-
= note: extraneous unsafe is not allowed in attributes
38-
39-
error: `allow` is not an unsafe attribute
40-
--> $DIR/proc-unsafe-attributes.rs:23:3
41-
|
42-
LL | #[unsafe(allow(dead_code))]
43-
| ^^^^^^ this is not an unsafe attribute
44-
|
45-
= note: extraneous unsafe is not allowed in attributes
46-
47-
error: `allow` is not an unsafe attribute
48-
--> $DIR/proc-unsafe-attributes.rs:27:3
49-
|
50-
LL | #[unsafe(allow(unsafe(dead_code)))]
51-
| ^^^^^^ this is not an unsafe attribute
52-
|
53-
= note: extraneous unsafe is not allowed in attributes
54-
5515
error: expected identifier, found keyword `unsafe`
5616
--> $DIR/proc-unsafe-attributes.rs:27:16
5717
|
@@ -103,6 +63,22 @@ LL | #[unsafe(allow(unsafe(dead_code)))]
10363
|
10464
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
10565

66+
error: `proc_macro` is not an unsafe attribute
67+
--> $DIR/proc-unsafe-attributes.rs:1:3
68+
|
69+
LL | #[unsafe(proc_macro)]
70+
| ^^^^^^ this is not an unsafe attribute
71+
|
72+
= note: extraneous unsafe is not allowed in attributes
73+
74+
error: `proc_macro_derive` is not an unsafe attribute
75+
--> $DIR/proc-unsafe-attributes.rs:7:3
76+
|
77+
LL | #[unsafe(proc_macro_derive(Foo))]
78+
| ^^^^^^ this is not an unsafe attribute
79+
|
80+
= note: extraneous unsafe is not allowed in attributes
81+
10682
error: expected identifier, found keyword `unsafe`
10783
--> $DIR/proc-unsafe-attributes.rs:12:21
10884
|
@@ -132,6 +108,30 @@ LL - #[proc_macro_derive(unsafe(Foo))]
132108
LL + #[proc_macro_derive(TraitName, attributes(name1, name2, ...))]
133109
|
134110

111+
error: `proc_macro_attribute` is not an unsafe attribute
112+
--> $DIR/proc-unsafe-attributes.rs:18:3
113+
|
114+
LL | #[unsafe(proc_macro_attribute)]
115+
| ^^^^^^ this is not an unsafe attribute
116+
|
117+
= note: extraneous unsafe is not allowed in attributes
118+
119+
error: `allow` is not an unsafe attribute
120+
--> $DIR/proc-unsafe-attributes.rs:23:3
121+
|
122+
LL | #[unsafe(allow(dead_code))]
123+
| ^^^^^^ this is not an unsafe attribute
124+
|
125+
= note: extraneous unsafe is not allowed in attributes
126+
127+
error: `allow` is not an unsafe attribute
128+
--> $DIR/proc-unsafe-attributes.rs:27:3
129+
|
130+
LL | #[unsafe(allow(unsafe(dead_code)))]
131+
| ^^^^^^ this is not an unsafe attribute
132+
|
133+
= note: extraneous unsafe is not allowed in attributes
134+
135135
error[E0452]: malformed lint attribute input
136136
--> $DIR/proc-unsafe-attributes.rs:27:16
137137
|

tests/ui/ffi-attrs/ffi_const.stderr

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,3 @@
1-
error: unsafe attribute used without unsafe
2-
--> $DIR/ffi_const.rs:16:7
3-
|
4-
LL | #[ffi_const]
5-
| ^^^^^^^^^ usage of unsafe attribute
6-
|
7-
help: wrap the attribute in `unsafe(...)`
8-
|
9-
LL | #[unsafe(ffi_const)]
10-
| +++++++ +
11-
121
error: `#[ffi_const]` attribute cannot be used on functions
132
--> $DIR/ffi_const.rs:4:1
143
|
@@ -33,5 +22,16 @@ LL | #[unsafe(ffi_const)]
3322
|
3423
= help: `#[ffi_const]` can only be applied to foreign functions
3524

25+
error: unsafe attribute used without unsafe
26+
--> $DIR/ffi_const.rs:16:7
27+
|
28+
LL | #[ffi_const]
29+
| ^^^^^^^^^ usage of unsafe attribute
30+
|
31+
help: wrap the attribute in `unsafe(...)`
32+
|
33+
LL | #[unsafe(ffi_const)]
34+
| +++++++ +
35+
3636
error: aborting due to 4 previous errors
3737

tests/ui/ffi-attrs/ffi_pure.stderr

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,3 @@
1-
error: unsafe attribute used without unsafe
2-
--> $DIR/ffi_pure.rs:16:7
3-
|
4-
LL | #[ffi_pure]
5-
| ^^^^^^^^ usage of unsafe attribute
6-
|
7-
help: wrap the attribute in `unsafe(...)`
8-
|
9-
LL | #[unsafe(ffi_pure)]
10-
| +++++++ +
11-
121
error: `#[ffi_pure]` attribute cannot be used on functions
132
--> $DIR/ffi_pure.rs:4:1
143
|
@@ -33,5 +22,16 @@ LL | #[unsafe(ffi_pure)]
3322
|
3423
= help: `#[ffi_pure]` can only be applied to foreign functions
3524

25+
error: unsafe attribute used without unsafe
26+
--> $DIR/ffi_pure.rs:16:7
27+
|
28+
LL | #[ffi_pure]
29+
| ^^^^^^^^ usage of unsafe attribute
30+
|
31+
help: wrap the attribute in `unsafe(...)`
32+
|
33+
LL | #[unsafe(ffi_pure)]
34+
| +++++++ +
35+
3636
error: aborting due to 4 previous errors
3737

0 commit comments

Comments
 (0)