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