]>
Commit | Line | Data |
---|---|---|
6a06907d XL |
1 | error: declaration of a `no_mangle` function |
2 | --> $DIR/lint-unsafe-code.rs:31:1 | |
b7449926 | 3 | | |
6a06907d XL |
4 | LL | #[no_mangle] fn foo() {} |
5 | | ^^^^^^^^^^^^ | |
b7449926 | 6 | | |
74b04a01 | 7 | note: the lint level is defined here |
0731742a | 8 | --> $DIR/lint-unsafe-code.rs:3:9 |
b7449926 XL |
9 | | |
10 | LL | #![deny(unsafe_code)] | |
11 | | ^^^^^^^^^^^ | |
6a06907d XL |
12 | = note: the linker's behavior with multiple libraries exporting duplicate symbol names is undefined and Rust cannot provide guarantees when you manually override them |
13 | ||
14 | error: declaration of a `no_mangle` static | |
15 | --> $DIR/lint-unsafe-code.rs:32:1 | |
16 | | | |
17 | LL | #[no_mangle] static FOO: u32 = 5; | |
18 | | ^^^^^^^^^^^^ | |
19 | | | |
20 | = note: the linker's behavior with multiple libraries exporting duplicate symbol names is undefined and Rust cannot provide guarantees when you manually override them | |
21 | ||
22 | error: declaration of a function with `export_name` | |
23 | --> $DIR/lint-unsafe-code.rs:34:1 | |
24 | | | |
25 | LL | #[export_name = "bar"] fn bar() {} | |
26 | | ^^^^^^^^^^^^^^^^^^^^^^ | |
27 | | | |
28 | = note: the linker's behavior with multiple libraries exporting duplicate symbol names is undefined and Rust cannot provide guarantees when you manually override them | |
29 | ||
30 | error: declaration of a static with `export_name` | |
31 | --> $DIR/lint-unsafe-code.rs:35:1 | |
32 | | | |
33 | LL | #[export_name = "BAR"] static BAR: u32 = 5; | |
34 | | ^^^^^^^^^^^^^^^^^^^^^^ | |
35 | | | |
36 | = note: the linker's behavior with multiple libraries exporting duplicate symbol names is undefined and Rust cannot provide guarantees when you manually override them | |
37 | ||
38 | error: declaration of an `unsafe` function | |
39 | --> $DIR/lint-unsafe-code.rs:37:1 | |
40 | | | |
41 | LL | unsafe fn baz() {} | |
42 | | ^^^^^^^^^^^^^^^^^^ | |
b7449926 XL |
43 | |
44 | error: declaration of an `unsafe` trait | |
6a06907d | 45 | --> $DIR/lint-unsafe-code.rs:38:1 |
b7449926 | 46 | | |
532ac7d7 | 47 | LL | unsafe trait Foo {} |
b7449926 XL |
48 | | ^^^^^^^^^^^^^^^^^^^ |
49 | ||
50 | error: implementation of an `unsafe` trait | |
6a06907d | 51 | --> $DIR/lint-unsafe-code.rs:39:1 |
b7449926 | 52 | | |
532ac7d7 | 53 | LL | unsafe impl Foo for Bar {} |
b7449926 XL |
54 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^ |
55 | ||
56 | error: declaration of an `unsafe` method | |
6a06907d | 57 | --> $DIR/lint-unsafe-code.rs:42:5 |
b7449926 | 58 | | |
532ac7d7 | 59 | LL | unsafe fn baz(&self); |
b7449926 XL |
60 | | ^^^^^^^^^^^^^^^^^^^^^ |
61 | ||
62 | error: implementation of an `unsafe` method | |
6a06907d | 63 | --> $DIR/lint-unsafe-code.rs:43:5 |
b7449926 | 64 | | |
532ac7d7 | 65 | LL | unsafe fn provided(&self) {} |
b7449926 XL |
66 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
67 | ||
68 | error: implementation of an `unsafe` method | |
6a06907d | 69 | --> $DIR/lint-unsafe-code.rs:44:5 |
b7449926 | 70 | | |
532ac7d7 | 71 | LL | unsafe fn provided_override(&self) {} |
b7449926 XL |
72 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
73 | ||
74 | error: implementation of an `unsafe` method | |
6a06907d | 75 | --> $DIR/lint-unsafe-code.rs:48:5 |
b7449926 | 76 | | |
532ac7d7 | 77 | LL | unsafe fn baz(&self) {} |
b7449926 XL |
78 | | ^^^^^^^^^^^^^^^^^^^^^^^ |
79 | ||
80 | error: implementation of an `unsafe` method | |
6a06907d | 81 | --> $DIR/lint-unsafe-code.rs:49:5 |
b7449926 | 82 | | |
532ac7d7 | 83 | LL | unsafe fn provided_override(&self) {} |
b7449926 XL |
84 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
85 | ||
86 | error: implementation of an `unsafe` method | |
6a06907d | 87 | --> $DIR/lint-unsafe-code.rs:68:5 |
b7449926 | 88 | | |
532ac7d7 | 89 | LL | unsafe fn provided_override(&self) {} |
b7449926 XL |
90 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
91 | ||
92 | error: implementation of an `unsafe` method | |
6a06907d | 93 | --> $DIR/lint-unsafe-code.rs:79:5 |
b7449926 | 94 | | |
532ac7d7 | 95 | LL | unsafe fn provided(&self) {} |
b7449926 XL |
96 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
97 | ||
98 | error: implementation of an `unsafe` method | |
6a06907d | 99 | --> $DIR/lint-unsafe-code.rs:85:5 |
b7449926 | 100 | | |
532ac7d7 | 101 | LL | unsafe fn provided(&self) {} |
b7449926 XL |
102 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
103 | ||
104 | error: implementation of an `unsafe` method | |
6a06907d | 105 | --> $DIR/lint-unsafe-code.rs:89:5 |
b7449926 | 106 | | |
532ac7d7 | 107 | LL | unsafe fn baz(&self) {} |
b7449926 XL |
108 | | ^^^^^^^^^^^^^^^^^^^^^^^ |
109 | ||
110 | error: usage of an `unsafe` block | |
6a06907d | 111 | --> $DIR/lint-unsafe-code.rs:100:5 |
b7449926 | 112 | | |
532ac7d7 | 113 | LL | unsafe {} |
b7449926 XL |
114 | | ^^^^^^^^^ |
115 | ||
6a06907d XL |
116 | error: declaration of a `no_mangle` function |
117 | --> $DIR/lint-unsafe-code.rs:21:9 | |
118 | | | |
119 | LL | #[no_mangle] fn foo() {} | |
120 | | ^^^^^^^^^^^^ | |
121 | ... | |
122 | LL | unsafe_in_macro!() | |
123 | | ------------------ in this macro invocation | |
124 | | | |
125 | = note: the linker's behavior with multiple libraries exporting duplicate symbol names is undefined and Rust cannot provide guarantees when you manually override them | |
17df50a5 | 126 | = note: this error originates in the macro `unsafe_in_macro` (in Nightly builds, run with -Z macro-backtrace for more info) |
6a06907d XL |
127 | |
128 | error: declaration of a `no_mangle` static | |
129 | --> $DIR/lint-unsafe-code.rs:22:9 | |
130 | | | |
131 | LL | #[no_mangle] static FOO: u32 = 5; | |
132 | | ^^^^^^^^^^^^ | |
133 | ... | |
134 | LL | unsafe_in_macro!() | |
135 | | ------------------ in this macro invocation | |
136 | | | |
137 | = note: the linker's behavior with multiple libraries exporting duplicate symbol names is undefined and Rust cannot provide guarantees when you manually override them | |
17df50a5 | 138 | = note: this error originates in the macro `unsafe_in_macro` (in Nightly builds, run with -Z macro-backtrace for more info) |
6a06907d XL |
139 | |
140 | error: declaration of a function with `export_name` | |
141 | --> $DIR/lint-unsafe-code.rs:23:9 | |
142 | | | |
143 | LL | #[export_name = "bar"] fn bar() {} | |
144 | | ^^^^^^^^^^^^^^^^^^^^^^ | |
145 | ... | |
146 | LL | unsafe_in_macro!() | |
147 | | ------------------ in this macro invocation | |
148 | | | |
149 | = note: the linker's behavior with multiple libraries exporting duplicate symbol names is undefined and Rust cannot provide guarantees when you manually override them | |
17df50a5 | 150 | = note: this error originates in the macro `unsafe_in_macro` (in Nightly builds, run with -Z macro-backtrace for more info) |
6a06907d XL |
151 | |
152 | error: declaration of a static with `export_name` | |
153 | --> $DIR/lint-unsafe-code.rs:25:9 | |
154 | | | |
155 | LL | #[export_name = "BAR"] static BAR: u32 = 5; | |
156 | | ^^^^^^^^^^^^^^^^^^^^^^ | |
157 | ... | |
158 | LL | unsafe_in_macro!() | |
159 | | ------------------ in this macro invocation | |
160 | | | |
161 | = note: the linker's behavior with multiple libraries exporting duplicate symbol names is undefined and Rust cannot provide guarantees when you manually override them | |
17df50a5 | 162 | = note: this error originates in the macro `unsafe_in_macro` (in Nightly builds, run with -Z macro-backtrace for more info) |
6a06907d | 163 | |
b7449926 | 164 | error: usage of an `unsafe` block |
6a06907d | 165 | --> $DIR/lint-unsafe-code.rs:27:9 |
b7449926 | 166 | | |
532ac7d7 | 167 | LL | unsafe {} |
b7449926 XL |
168 | | ^^^^^^^^^ |
169 | ... | |
170 | LL | unsafe_in_macro!() | |
171 | | ------------------ in this macro invocation | |
74b04a01 | 172 | | |
17df50a5 | 173 | = note: this error originates in the macro `unsafe_in_macro` (in Nightly builds, run with -Z macro-backtrace for more info) |
b7449926 | 174 | |
6a06907d | 175 | error: aborting due to 22 previous errors |
b7449926 | 176 |