@@ -17,6 +17,51 @@ LL | fn hidden_niche_unsafe_cell() -> Option<UnsafeCell<NonZero<usiz
17
17
= help: consider adding a `#[repr(C)]`, `#[repr(transparent)]`, or integer `#[repr(...)]` attribute to this enum
18
18
= note: enum has no representation hint
19
19
20
+ warning: `extern` block uses type `(usize) is 1..=`, which is not FFI-safe
21
+ --> $DIR/clashing-extern-fn.rs:500:39
22
+ |
23
+ LL | fn pt_non_zero_usize() -> pattern_type!(usize is 1..);
24
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
25
+ |
26
+ = help: consider using the base type instead
27
+ = note: pattern types have no C equivalent
28
+
29
+ warning: `extern` block uses type `Option<(usize) is 1..=>`, which is not FFI-safe
30
+ --> $DIR/clashing-extern-fn.rs:502:43
31
+ |
32
+ LL | fn pt_non_zero_usize_opt() -> Option<pattern_type!(usize is 1..)>;
33
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
34
+ |
35
+ = help: consider adding a `#[repr(C)]`, `#[repr(transparent)]`, or integer `#[repr(...)]` attribute to this enum
36
+ = note: enum has no representation hint
37
+
38
+ warning: `extern` block uses type `(usize) is 1..=`, which is not FFI-safe
39
+ --> $DIR/clashing-extern-fn.rs:504:37
40
+ |
41
+ LL | fn pt_non_null_ptr() -> pattern_type!(usize is 1..);
42
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
43
+ |
44
+ = help: consider using the base type instead
45
+ = note: pattern types have no C equivalent
46
+
47
+ warning: `extern` block uses type `(usize) is 1..=`, which is not FFI-safe
48
+ --> $DIR/clashing-extern-fn.rs:506:47
49
+ |
50
+ LL | fn pt_non_zero_usize_wrapper() -> NonZeroUsize;
51
+ | ^^^^^^^^^^^^ not FFI-safe
52
+ |
53
+ = help: consider using the base type instead
54
+ = note: pattern types have no C equivalent
55
+
56
+ warning: `extern` block uses type `Option<NonZeroUsize>`, which is not FFI-safe
57
+ --> $DIR/clashing-extern-fn.rs:508:51
58
+ |
59
+ LL | fn pt_non_zero_usize_wrapper_opt() -> Option<NonZeroUsize>;
60
+ | ^^^^^^^^^^^^^^^^^^^^ not FFI-safe
61
+ |
62
+ = help: consider adding a `#[repr(C)]`, `#[repr(transparent)]`, or integer `#[repr(...)]` attribute to this enum
63
+ = note: enum has no representation hint
64
+
20
65
warning: `clash` redeclared with a different signature
21
66
--> $DIR/clashing-extern-fn.rs:13:13
22
67
|
@@ -258,5 +303,65 @@ LL | fn hidden_niche_unsafe_cell() -> Option<UnsafeCell<NonZero<usiz
258
303
= note: expected `unsafe extern "C" fn() -> usize`
259
304
found `unsafe extern "C" fn() -> Option<UnsafeCell<NonZero<usize>>>`
260
305
261
- warning: 22 warnings emitted
306
+ warning: `pt_non_zero_usize` redeclared with a different signature
307
+ --> $DIR/clashing-extern-fn.rs:517:13
308
+ |
309
+ LL | fn pt_non_zero_usize() -> pattern_type!(usize is 1..);
310
+ | ------------------------------------------------------ `pt_non_zero_usize` previously declared here
311
+ ...
312
+ LL | fn pt_non_zero_usize() -> usize;
313
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this signature doesn't match the previous declaration
314
+ |
315
+ = note: expected `unsafe extern "C" fn() -> (usize) is 1..=`
316
+ found `unsafe extern "C" fn() -> usize`
317
+
318
+ warning: `pt_non_zero_usize_opt` redeclared with a different signature
319
+ --> $DIR/clashing-extern-fn.rs:519:13
320
+ |
321
+ LL | fn pt_non_zero_usize_opt() -> Option<pattern_type!(usize is 1..)>;
322
+ | ------------------------------------------------------------------ `pt_non_zero_usize_opt` previously declared here
323
+ ...
324
+ LL | fn pt_non_zero_usize_opt() -> usize;
325
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this signature doesn't match the previous declaration
326
+ |
327
+ = note: expected `unsafe extern "C" fn() -> Option<(usize) is 1..=>`
328
+ found `unsafe extern "C" fn() -> usize`
329
+
330
+ warning: `pt_non_null_ptr` redeclared with a different signature
331
+ --> $DIR/clashing-extern-fn.rs:521:13
332
+ |
333
+ LL | fn pt_non_null_ptr() -> pattern_type!(usize is 1..);
334
+ | ---------------------------------------------------- `pt_non_null_ptr` previously declared here
335
+ ...
336
+ LL | fn pt_non_null_ptr() -> *const ();
337
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this signature doesn't match the previous declaration
338
+ |
339
+ = note: expected `unsafe extern "C" fn() -> (usize) is 1..=`
340
+ found `unsafe extern "C" fn() -> *const ()`
341
+
342
+ warning: `pt_non_zero_usize_wrapper` redeclared with a different signature
343
+ --> $DIR/clashing-extern-fn.rs:523:13
344
+ |
345
+ LL | fn pt_non_zero_usize_wrapper() -> NonZeroUsize;
346
+ | ----------------------------------------------- `pt_non_zero_usize_wrapper` previously declared here
347
+ ...
348
+ LL | fn pt_non_zero_usize_wrapper() -> usize;
349
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this signature doesn't match the previous declaration
350
+ |
351
+ = note: expected `unsafe extern "C" fn() -> NonZeroUsize`
352
+ found `unsafe extern "C" fn() -> usize`
353
+
354
+ warning: `pt_non_zero_usize_wrapper_opt` redeclared with a different signature
355
+ --> $DIR/clashing-extern-fn.rs:525:13
356
+ |
357
+ LL | fn pt_non_zero_usize_wrapper_opt() -> Option<NonZeroUsize>;
358
+ | ----------------------------------------------------------- `pt_non_zero_usize_wrapper_opt` previously declared here
359
+ ...
360
+ LL | fn pt_non_zero_usize_wrapper_opt() -> usize;
361
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this signature doesn't match the previous declaration
362
+ |
363
+ = note: expected `unsafe extern "C" fn() -> Option<NonZeroUsize>`
364
+ found `unsafe extern "C" fn() -> usize`
365
+
366
+ warning: 32 warnings emitted
262
367
0 commit comments