]> git.lizzy.rs Git - rust.git/blob - src/test/ui/lint/lint-unsafe-code.stderr
Rollup merge of #87180 - notriddle:notriddle/sidebar-keyboard-mobile, r=GuillaumeGomez
[rust.git] / src / test / ui / lint / lint-unsafe-code.stderr
1 error: declaration of a `no_mangle` function
2   --> $DIR/lint-unsafe-code.rs:31:1
3    |
4 LL | #[no_mangle] fn foo() {}
5    | ^^^^^^^^^^^^
6    |
7 note: the lint level is defined here
8   --> $DIR/lint-unsafe-code.rs:3:9
9    |
10 LL | #![deny(unsafe_code)]
11    |         ^^^^^^^^^^^
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    | ^^^^^^^^^^^^^^^^^^
43
44 error: declaration of an `unsafe` trait
45   --> $DIR/lint-unsafe-code.rs:38:1
46    |
47 LL | unsafe trait Foo {}
48    | ^^^^^^^^^^^^^^^^^^^
49
50 error: implementation of an `unsafe` trait
51   --> $DIR/lint-unsafe-code.rs:39:1
52    |
53 LL | unsafe impl Foo for Bar {}
54    | ^^^^^^^^^^^^^^^^^^^^^^^^^^
55
56 error: declaration of an `unsafe` method
57   --> $DIR/lint-unsafe-code.rs:42:5
58    |
59 LL |     unsafe fn baz(&self);
60    |     ^^^^^^^^^^^^^^^^^^^^^
61
62 error: implementation of an `unsafe` method
63   --> $DIR/lint-unsafe-code.rs:43:5
64    |
65 LL |     unsafe fn provided(&self) {}
66    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
67
68 error: implementation of an `unsafe` method
69   --> $DIR/lint-unsafe-code.rs:44:5
70    |
71 LL |     unsafe fn provided_override(&self) {}
72    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
73
74 error: implementation of an `unsafe` method
75   --> $DIR/lint-unsafe-code.rs:48:5
76    |
77 LL |     unsafe fn baz(&self) {}
78    |     ^^^^^^^^^^^^^^^^^^^^^^^
79
80 error: implementation of an `unsafe` method
81   --> $DIR/lint-unsafe-code.rs:49:5
82    |
83 LL |     unsafe fn provided_override(&self) {}
84    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
85
86 error: implementation of an `unsafe` method
87   --> $DIR/lint-unsafe-code.rs:68:5
88    |
89 LL |     unsafe fn provided_override(&self) {}
90    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
91
92 error: implementation of an `unsafe` method
93   --> $DIR/lint-unsafe-code.rs:79:5
94    |
95 LL |     unsafe fn provided(&self) {}
96    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
97
98 error: implementation of an `unsafe` method
99   --> $DIR/lint-unsafe-code.rs:85:5
100    |
101 LL |     unsafe fn provided(&self) {}
102    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
103
104 error: implementation of an `unsafe` method
105   --> $DIR/lint-unsafe-code.rs:89:5
106    |
107 LL |     unsafe fn baz(&self) {}
108    |     ^^^^^^^^^^^^^^^^^^^^^^^
109
110 error: usage of an `unsafe` block
111   --> $DIR/lint-unsafe-code.rs:100:5
112    |
113 LL |     unsafe {}
114    |     ^^^^^^^^^
115
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
126    = note: this error originates in the macro `unsafe_in_macro` (in Nightly builds, run with -Z macro-backtrace for more info)
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
138    = note: this error originates in the macro `unsafe_in_macro` (in Nightly builds, run with -Z macro-backtrace for more info)
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
150    = note: this error originates in the macro `unsafe_in_macro` (in Nightly builds, run with -Z macro-backtrace for more info)
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
162    = note: this error originates in the macro `unsafe_in_macro` (in Nightly builds, run with -Z macro-backtrace for more info)
163
164 error: usage of an `unsafe` block
165   --> $DIR/lint-unsafe-code.rs:27:9
166    |
167 LL |         unsafe {}
168    |         ^^^^^^^^^
169 ...
170 LL |     unsafe_in_macro!()
171    |     ------------------ in this macro invocation
172    |
173    = note: this error originates in the macro `unsafe_in_macro` (in Nightly builds, run with -Z macro-backtrace for more info)
174
175 error: aborting due to 22 previous errors
176