]> git.proxmox.com Git - rustc.git/blame - src/test/ui/lint/clashing-extern-fn.stderr
Merge tag 'debian/1.52.1+dfsg1-1_exp2' into proxmox/buster
[rustc.git] / src / test / ui / lint / clashing-extern-fn.stderr
CommitLineData
f035d41b 1warning: `clash` redeclared with a different signature
6a06907d 2 --> $DIR/clashing-extern-fn.rs:15:13
f035d41b 3 |
3dfed10e
XL
4LL | fn clash(x: u8);
5 | ---------------- `clash` previously declared here
f035d41b 6...
3dfed10e
XL
7LL | fn clash(x: u64);
8 | ^^^^^^^^^^^^^^^^^ this signature doesn't match the previous declaration
f035d41b
XL
9 |
10note: the lint level is defined here
6a06907d 11 --> $DIR/clashing-extern-fn.rs:5:9
f035d41b
XL
12 |
13LL | #![warn(clashing_extern_declarations)]
14 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
15 = note: expected `unsafe extern "C" fn(u8)`
16 found `unsafe extern "C" fn(u64)`
17
f035d41b 18warning: `extern_link_name` redeclared with a different signature
6a06907d 19 --> $DIR/clashing-extern-fn.rs:53:9
f035d41b
XL
20 |
21LL | / #[link_name = "extern_link_name"]
22LL | | fn some_new_name(x: i16);
23 | |_____________________________- `extern_link_name` previously declared here
24...
25LL | fn extern_link_name(x: u32);
26 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this signature doesn't match the previous declaration
27 |
28 = note: expected `unsafe extern "C" fn(i16)`
29 found `unsafe extern "C" fn(u32)`
30
31warning: `some_other_extern_link_name` redeclares `some_other_new_name` with a different signature
6a06907d 32 --> $DIR/clashing-extern-fn.rs:56:9
f035d41b
XL
33 |
34LL | fn some_other_new_name(x: i16);
35 | ------------------------------- `some_other_new_name` previously declared here
36...
37LL | / #[link_name = "some_other_new_name"]
38LL | |
39LL | | fn some_other_extern_link_name(x: u32);
40 | |_______________________________________________^ this signature doesn't match the previous declaration
41 |
42 = note: expected `unsafe extern "C" fn(i16)`
43 found `unsafe extern "C" fn(u32)`
44
45warning: `other_both_names_different` redeclares `link_name_same` with a different signature
6a06907d 46 --> $DIR/clashing-extern-fn.rs:60:9
f035d41b
XL
47 |
48LL | / #[link_name = "link_name_same"]
49LL | | fn both_names_different(x: i16);
50 | |____________________________________- `link_name_same` previously declared here
51...
52LL | / #[link_name = "link_name_same"]
53LL | |
54LL | | fn other_both_names_different(x: u32);
55 | |______________________________________________^ this signature doesn't match the previous declaration
56 |
57 = note: expected `unsafe extern "C" fn(i16)`
58 found `unsafe extern "C" fn(u32)`
59
60warning: `different_mod` redeclared with a different signature
6a06907d 61 --> $DIR/clashing-extern-fn.rs:73:9
f035d41b
XL
62 |
63LL | fn different_mod(x: u8);
64 | ------------------------ `different_mod` previously declared here
65...
66LL | fn different_mod(x: u64);
67 | ^^^^^^^^^^^^^^^^^^^^^^^^^ this signature doesn't match the previous declaration
68 |
69 = note: expected `unsafe extern "C" fn(u8)`
70 found `unsafe extern "C" fn(u64)`
71
72warning: `variadic_decl` redeclared with a different signature
6a06907d 73 --> $DIR/clashing-extern-fn.rs:83:9
f035d41b
XL
74 |
75LL | fn variadic_decl(x: u8, ...);
76 | ----------------------------- `variadic_decl` previously declared here
77...
78LL | fn variadic_decl(x: u8);
79 | ^^^^^^^^^^^^^^^^^^^^^^^^ this signature doesn't match the previous declaration
80 |
81 = note: expected `unsafe extern "C" fn(u8, ...)`
82 found `unsafe extern "C" fn(u8)`
83
84warning: `weigh_banana` redeclared with a different signature
6a06907d 85 --> $DIR/clashing-extern-fn.rs:143:13
f035d41b
XL
86 |
87LL | fn weigh_banana(count: *const Banana) -> u64;
88 | --------------------------------------------- `weigh_banana` previously declared here
89...
90LL | fn weigh_banana(count: *const Banana) -> u64;
91 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this signature doesn't match the previous declaration
92 |
1b1a35ee
XL
93 = note: expected `unsafe extern "C" fn(*const one::Banana) -> u64`
94 found `unsafe extern "C" fn(*const three::Banana) -> u64`
f035d41b
XL
95
96warning: `draw_point` redeclared with a different signature
6a06907d 97 --> $DIR/clashing-extern-fn.rs:172:13
f035d41b
XL
98 |
99LL | fn draw_point(p: Point);
100 | ------------------------ `draw_point` previously declared here
101...
102LL | fn draw_point(p: Point);
103 | ^^^^^^^^^^^^^^^^^^^^^^^^ this signature doesn't match the previous declaration
104 |
105 = note: expected `unsafe extern "C" fn(sameish_members::a::Point)`
106 found `unsafe extern "C" fn(sameish_members::b::Point)`
107
3dfed10e 108warning: `origin` redeclared with a different signature
6a06907d 109 --> $DIR/clashing-extern-fn.rs:198:13
3dfed10e 110 |
1b1a35ee
XL
111LL | fn origin() -> Point3;
112 | ---------------------- `origin` previously declared here
3dfed10e 113...
1b1a35ee
XL
114LL | fn origin() -> Point3;
115 | ^^^^^^^^^^^^^^^^^^^^^^ this signature doesn't match the previous declaration
3dfed10e
XL
116 |
117 = note: expected `unsafe extern "C" fn() -> same_sized_members_clash::a::Point3`
118 found `unsafe extern "C" fn() -> same_sized_members_clash::b::Point3`
119
120warning: `transparent_incorrect` redeclared with a different signature
6a06907d 121 --> $DIR/clashing-extern-fn.rs:221:13
3dfed10e
XL
122 |
123LL | fn transparent_incorrect() -> T;
124 | -------------------------------- `transparent_incorrect` previously declared here
125...
126LL | fn transparent_incorrect() -> isize;
127 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this signature doesn't match the previous declaration
128 |
1b1a35ee 129 = note: expected `unsafe extern "C" fn() -> T`
3dfed10e
XL
130 found `unsafe extern "C" fn() -> isize`
131
132warning: `missing_return_type` redeclared with a different signature
6a06907d 133 --> $DIR/clashing-extern-fn.rs:239:13
3dfed10e
XL
134 |
135LL | fn missing_return_type() -> usize;
136 | ---------------------------------- `missing_return_type` previously declared here
137...
138LL | fn missing_return_type();
139 | ^^^^^^^^^^^^^^^^^^^^^^^^^ this signature doesn't match the previous declaration
140 |
141 = note: expected `unsafe extern "C" fn() -> usize`
142 found `unsafe extern "C" fn()`
143
144warning: `non_zero_usize` redeclared with a different signature
6a06907d 145 --> $DIR/clashing-extern-fn.rs:257:13
3dfed10e
XL
146 |
147LL | fn non_zero_usize() -> core::num::NonZeroUsize;
148 | ----------------------------------------------- `non_zero_usize` previously declared here
149...
150LL | fn non_zero_usize() -> usize;
151 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this signature doesn't match the previous declaration
152 |
1b1a35ee 153 = note: expected `unsafe extern "C" fn() -> NonZeroUsize`
3dfed10e
XL
154 found `unsafe extern "C" fn() -> usize`
155
156warning: `non_null_ptr` redeclared with a different signature
6a06907d 157 --> $DIR/clashing-extern-fn.rs:259:13
3dfed10e
XL
158 |
159LL | fn non_null_ptr() -> core::ptr::NonNull<usize>;
160 | ----------------------------------------------- `non_null_ptr` previously declared here
161...
162LL | fn non_null_ptr() -> *const usize;
163 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this signature doesn't match the previous declaration
164 |
1b1a35ee 165 = note: expected `unsafe extern "C" fn() -> NonNull<usize>`
3dfed10e
XL
166 found `unsafe extern "C" fn() -> *const usize`
167
168warning: `option_non_zero_usize_incorrect` redeclared with a different signature
6a06907d 169 --> $DIR/clashing-extern-fn.rs:357:13
3dfed10e
XL
170 |
171LL | fn option_non_zero_usize_incorrect() -> usize;
172 | ---------------------------------------------- `option_non_zero_usize_incorrect` previously declared here
173...
174LL | fn option_non_zero_usize_incorrect() -> isize;
175 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this signature doesn't match the previous declaration
176 |
177 = note: expected `unsafe extern "C" fn() -> usize`
178 found `unsafe extern "C" fn() -> isize`
179
180warning: `option_non_null_ptr_incorrect` redeclared with a different signature
6a06907d 181 --> $DIR/clashing-extern-fn.rs:359:13
3dfed10e
XL
182 |
183LL | fn option_non_null_ptr_incorrect() -> *const usize;
184 | --------------------------------------------------- `option_non_null_ptr_incorrect` previously declared here
185...
186LL | fn option_non_null_ptr_incorrect() -> *const isize;
187 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this signature doesn't match the previous declaration
188 |
189 = note: expected `unsafe extern "C" fn() -> *const usize`
190 found `unsafe extern "C" fn() -> *const isize`
191
6a06907d
XL
192warning: `hidden_niche_transparent_no_niche` redeclared with a different signature
193 --> $DIR/clashing-extern-fn.rs:410:13
194 |
195LL | fn hidden_niche_transparent_no_niche() -> usize;
196 | ------------------------------------------------ `hidden_niche_transparent_no_niche` previously declared here
197...
198LL | fn hidden_niche_transparent_no_niche() -> Option<TransparentNoNiche>;
199 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this signature doesn't match the previous declaration
200 |
201 = note: expected `unsafe extern "C" fn() -> usize`
202 found `unsafe extern "C" fn() -> Option<TransparentNoNiche>`
203
204warning: `hidden_niche_unsafe_cell` redeclared with a different signature
205 --> $DIR/clashing-extern-fn.rs:414:13
206 |
207LL | fn hidden_niche_unsafe_cell() -> usize;
208 | --------------------------------------- `hidden_niche_unsafe_cell` previously declared here
209...
210LL | fn hidden_niche_unsafe_cell() -> Option<UnsafeCell<NonZeroUsize>>;
211 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this signature doesn't match the previous declaration
212 |
213 = note: expected `unsafe extern "C" fn() -> usize`
214 found `unsafe extern "C" fn() -> Option<UnsafeCell<NonZeroUsize>>`
215
216warning: `extern` block uses type `Option<TransparentNoNiche>`, which is not FFI-safe
217 --> $DIR/clashing-extern-fn.rs:410:55
218 |
219LL | fn hidden_niche_transparent_no_niche() -> Option<TransparentNoNiche>;
220 | ^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
221 |
222 = note: `#[warn(improper_ctypes)]` on by default
223 = help: consider adding a `#[repr(C)]`, `#[repr(transparent)]`, or integer `#[repr(...)]` attribute to this enum
224 = note: enum has no representation hint
225
226warning: `extern` block uses type `Option<UnsafeCell<NonZeroUsize>>`, which is not FFI-safe
227 --> $DIR/clashing-extern-fn.rs:414:46
228 |
229LL | fn hidden_niche_unsafe_cell() -> Option<UnsafeCell<NonZeroUsize>>;
230 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
231 |
232 = help: consider adding a `#[repr(C)]`, `#[repr(transparent)]`, or integer `#[repr(...)]` attribute to this enum
233 = note: enum has no representation hint
234
235warning: 19 warnings emitted
f035d41b 236