]> git.proxmox.com Git - rustc.git/blame - src/test/ui/lint/lint-unsafe-code.stderr
New upstream version 1.54.0+dfsg1
[rustc.git] / src / test / ui / lint / lint-unsafe-code.stderr
CommitLineData
6a06907d
XL
1error: declaration of a `no_mangle` function
2 --> $DIR/lint-unsafe-code.rs:31:1
b7449926 3 |
6a06907d
XL
4LL | #[no_mangle] fn foo() {}
5 | ^^^^^^^^^^^^
b7449926 6 |
74b04a01 7note: the lint level is defined here
0731742a 8 --> $DIR/lint-unsafe-code.rs:3:9
b7449926
XL
9 |
10LL | #![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
14error: declaration of a `no_mangle` static
15 --> $DIR/lint-unsafe-code.rs:32:1
16 |
17LL | #[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
22error: declaration of a function with `export_name`
23 --> $DIR/lint-unsafe-code.rs:34:1
24 |
25LL | #[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
30error: declaration of a static with `export_name`
31 --> $DIR/lint-unsafe-code.rs:35:1
32 |
33LL | #[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
38error: declaration of an `unsafe` function
39 --> $DIR/lint-unsafe-code.rs:37:1
40 |
41LL | unsafe fn baz() {}
42 | ^^^^^^^^^^^^^^^^^^
b7449926
XL
43
44error: declaration of an `unsafe` trait
6a06907d 45 --> $DIR/lint-unsafe-code.rs:38:1
b7449926 46 |
532ac7d7 47LL | unsafe trait Foo {}
b7449926
XL
48 | ^^^^^^^^^^^^^^^^^^^
49
50error: implementation of an `unsafe` trait
6a06907d 51 --> $DIR/lint-unsafe-code.rs:39:1
b7449926 52 |
532ac7d7 53LL | unsafe impl Foo for Bar {}
b7449926
XL
54 | ^^^^^^^^^^^^^^^^^^^^^^^^^^
55
56error: declaration of an `unsafe` method
6a06907d 57 --> $DIR/lint-unsafe-code.rs:42:5
b7449926 58 |
532ac7d7 59LL | unsafe fn baz(&self);
b7449926
XL
60 | ^^^^^^^^^^^^^^^^^^^^^
61
62error: implementation of an `unsafe` method
6a06907d 63 --> $DIR/lint-unsafe-code.rs:43:5
b7449926 64 |
532ac7d7 65LL | unsafe fn provided(&self) {}
b7449926
XL
66 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
67
68error: implementation of an `unsafe` method
6a06907d 69 --> $DIR/lint-unsafe-code.rs:44:5
b7449926 70 |
532ac7d7 71LL | unsafe fn provided_override(&self) {}
b7449926
XL
72 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
73
74error: implementation of an `unsafe` method
6a06907d 75 --> $DIR/lint-unsafe-code.rs:48:5
b7449926 76 |
532ac7d7 77LL | unsafe fn baz(&self) {}
b7449926
XL
78 | ^^^^^^^^^^^^^^^^^^^^^^^
79
80error: implementation of an `unsafe` method
6a06907d 81 --> $DIR/lint-unsafe-code.rs:49:5
b7449926 82 |
532ac7d7 83LL | unsafe fn provided_override(&self) {}
b7449926
XL
84 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
85
86error: implementation of an `unsafe` method
6a06907d 87 --> $DIR/lint-unsafe-code.rs:68:5
b7449926 88 |
532ac7d7 89LL | unsafe fn provided_override(&self) {}
b7449926
XL
90 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
91
92error: implementation of an `unsafe` method
6a06907d 93 --> $DIR/lint-unsafe-code.rs:79:5
b7449926 94 |
532ac7d7 95LL | unsafe fn provided(&self) {}
b7449926
XL
96 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
97
98error: implementation of an `unsafe` method
6a06907d 99 --> $DIR/lint-unsafe-code.rs:85:5
b7449926 100 |
532ac7d7 101LL | unsafe fn provided(&self) {}
b7449926
XL
102 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
103
104error: implementation of an `unsafe` method
6a06907d 105 --> $DIR/lint-unsafe-code.rs:89:5
b7449926 106 |
532ac7d7 107LL | unsafe fn baz(&self) {}
b7449926
XL
108 | ^^^^^^^^^^^^^^^^^^^^^^^
109
110error: usage of an `unsafe` block
6a06907d 111 --> $DIR/lint-unsafe-code.rs:100:5
b7449926 112 |
532ac7d7 113LL | unsafe {}
b7449926
XL
114 | ^^^^^^^^^
115
6a06907d
XL
116error: declaration of a `no_mangle` function
117 --> $DIR/lint-unsafe-code.rs:21:9
118 |
119LL | #[no_mangle] fn foo() {}
120 | ^^^^^^^^^^^^
121...
122LL | 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
128error: declaration of a `no_mangle` static
129 --> $DIR/lint-unsafe-code.rs:22:9
130 |
131LL | #[no_mangle] static FOO: u32 = 5;
132 | ^^^^^^^^^^^^
133...
134LL | 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
140error: declaration of a function with `export_name`
141 --> $DIR/lint-unsafe-code.rs:23:9
142 |
143LL | #[export_name = "bar"] fn bar() {}
144 | ^^^^^^^^^^^^^^^^^^^^^^
145...
146LL | 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
152error: declaration of a static with `export_name`
153 --> $DIR/lint-unsafe-code.rs:25:9
154 |
155LL | #[export_name = "BAR"] static BAR: u32 = 5;
156 | ^^^^^^^^^^^^^^^^^^^^^^
157...
158LL | 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 164error: usage of an `unsafe` block
6a06907d 165 --> $DIR/lint-unsafe-code.rs:27:9
b7449926 166 |
532ac7d7 167LL | unsafe {}
b7449926
XL
168 | ^^^^^^^^^
169...
170LL | 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 175error: aborting due to 22 previous errors
b7449926 176