1
1
error: declaration of a `no_mangle` function
2
- --> $DIR/lint-unsafe-code.rs:26 :14
2
+ --> $DIR/lint-unsafe-code.rs:31 :14
3
3
|
4
4
LL | #[no_mangle] fn foo() {}
5
5
| ^^^^^^^^^^^
@@ -11,91 +11,103 @@ LL | #![deny(unsafe_code)]
11
11
| ^^^^^^^^^^^
12
12
13
13
error: declaration of a `no_mangle` static
14
- --> $DIR/lint-unsafe-code.rs:27 :14
14
+ --> $DIR/lint-unsafe-code.rs:32 :14
15
15
|
16
16
LL | #[no_mangle] static FOO: u32 = 5;
17
17
| ^^^^^^^^^^^^^^^^^^^^
18
18
19
+ error: declaration of a function with `export_name`
20
+ --> $DIR/lint-unsafe-code.rs:34:24
21
+ |
22
+ LL | #[export_name = "bar"] fn bar() {}
23
+ | ^^^^^^^^^^^
24
+
25
+ error: declaration of a static with `export_name`
26
+ --> $DIR/lint-unsafe-code.rs:35:24
27
+ |
28
+ LL | #[export_name = "BAR"] static BAR: u32 = 5;
29
+ | ^^^^^^^^^^^^^^^^^^^^
30
+
19
31
error: declaration of an `unsafe` function
20
- --> $DIR/lint-unsafe-code.rs:29 :1
32
+ --> $DIR/lint-unsafe-code.rs:37 :1
21
33
|
22
34
LL | unsafe fn baz() {}
23
35
| ^^^^^^^^^^^^^^^^^^
24
36
25
37
error: declaration of an `unsafe` trait
26
- --> $DIR/lint-unsafe-code.rs:30 :1
38
+ --> $DIR/lint-unsafe-code.rs:38 :1
27
39
|
28
40
LL | unsafe trait Foo {}
29
41
| ^^^^^^^^^^^^^^^^^^^
30
42
31
43
error: implementation of an `unsafe` trait
32
- --> $DIR/lint-unsafe-code.rs:31 :1
44
+ --> $DIR/lint-unsafe-code.rs:39 :1
33
45
|
34
46
LL | unsafe impl Foo for Bar {}
35
47
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
36
48
37
49
error: declaration of an `unsafe` method
38
- --> $DIR/lint-unsafe-code.rs:34 :5
50
+ --> $DIR/lint-unsafe-code.rs:42 :5
39
51
|
40
52
LL | unsafe fn baz(&self);
41
53
| ^^^^^^^^^^^^^^^^^^^^^
42
54
43
55
error: implementation of an `unsafe` method
44
- --> $DIR/lint-unsafe-code.rs:35 :5
56
+ --> $DIR/lint-unsafe-code.rs:43 :5
45
57
|
46
58
LL | unsafe fn provided(&self) {}
47
59
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
48
60
49
61
error: implementation of an `unsafe` method
50
- --> $DIR/lint-unsafe-code.rs:36 :5
62
+ --> $DIR/lint-unsafe-code.rs:44 :5
51
63
|
52
64
LL | unsafe fn provided_override(&self) {}
53
65
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
54
66
55
67
error: implementation of an `unsafe` method
56
- --> $DIR/lint-unsafe-code.rs:40 :5
68
+ --> $DIR/lint-unsafe-code.rs:48 :5
57
69
|
58
70
LL | unsafe fn baz(&self) {}
59
71
| ^^^^^^^^^^^^^^^^^^^^^^^
60
72
61
73
error: implementation of an `unsafe` method
62
- --> $DIR/lint-unsafe-code.rs:41 :5
74
+ --> $DIR/lint-unsafe-code.rs:49 :5
63
75
|
64
76
LL | unsafe fn provided_override(&self) {}
65
77
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
66
78
67
79
error: implementation of an `unsafe` method
68
- --> $DIR/lint-unsafe-code.rs:60 :5
80
+ --> $DIR/lint-unsafe-code.rs:68 :5
69
81
|
70
82
LL | unsafe fn provided_override(&self) {}
71
83
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
72
84
73
85
error: implementation of an `unsafe` method
74
- --> $DIR/lint-unsafe-code.rs:71 :5
86
+ --> $DIR/lint-unsafe-code.rs:79 :5
75
87
|
76
88
LL | unsafe fn provided(&self) {}
77
89
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
78
90
79
91
error: implementation of an `unsafe` method
80
- --> $DIR/lint-unsafe-code.rs:77 :5
92
+ --> $DIR/lint-unsafe-code.rs:85 :5
81
93
|
82
94
LL | unsafe fn provided(&self) {}
83
95
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
84
96
85
97
error: implementation of an `unsafe` method
86
- --> $DIR/lint-unsafe-code.rs:81 :5
98
+ --> $DIR/lint-unsafe-code.rs:89 :5
87
99
|
88
100
LL | unsafe fn baz(&self) {}
89
101
| ^^^^^^^^^^^^^^^^^^^^^^^
90
102
91
103
error: usage of an `unsafe` block
92
- --> $DIR/lint-unsafe-code.rs:92 :5
104
+ --> $DIR/lint-unsafe-code.rs:100 :5
93
105
|
94
106
LL | unsafe {}
95
107
| ^^^^^^^^^
96
108
97
109
error: declaration of a `no_mangle` function
98
- --> $DIR/lint-unsafe-code.rs:20 :22
110
+ --> $DIR/lint-unsafe-code.rs:21 :22
99
111
|
100
112
LL | #[no_mangle] fn foo() {}
101
113
| ^^^^^^^^^^^
@@ -106,7 +118,7 @@ LL | unsafe_in_macro!()
106
118
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
107
119
108
120
error: declaration of a `no_mangle` static
109
- --> $DIR/lint-unsafe-code.rs:21 :22
121
+ --> $DIR/lint-unsafe-code.rs:22 :22
110
122
|
111
123
LL | #[no_mangle] static FOO: u32 = 5;
112
124
| ^^^^^^^^^^^^^^^^^^^^
@@ -116,8 +128,30 @@ LL | unsafe_in_macro!()
116
128
|
117
129
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
118
130
131
+ error: declaration of a function with `export_name`
132
+ --> $DIR/lint-unsafe-code.rs:23:32
133
+ |
134
+ LL | #[export_name = "bar"] fn bar() {}
135
+ | ^^^^^^^^^^^
136
+ ...
137
+ LL | unsafe_in_macro!()
138
+ | ------------------ in this macro invocation
139
+ |
140
+ = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
141
+
142
+ error: declaration of a static with `export_name`
143
+ --> $DIR/lint-unsafe-code.rs:25:32
144
+ |
145
+ LL | #[export_name = "BAR"] static BAR: u32 = 5;
146
+ | ^^^^^^^^^^^^^^^^^^^^
147
+ ...
148
+ LL | unsafe_in_macro!()
149
+ | ------------------ in this macro invocation
150
+ |
151
+ = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
152
+
119
153
error: usage of an `unsafe` block
120
- --> $DIR/lint-unsafe-code.rs:22 :9
154
+ --> $DIR/lint-unsafe-code.rs:27 :9
121
155
|
122
156
LL | unsafe {}
123
157
| ^^^^^^^^^
@@ -127,5 +161,5 @@ LL | unsafe_in_macro!()
127
161
|
128
162
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
129
163
130
- error: aborting due to 18 previous errors
164
+ error: aborting due to 22 previous errors
131
165
0 commit comments