|
| 1 | +warning: `clash` redeclared with a different signature |
| 2 | + --> $DIR/clashing-extern-fn.rs:15:9 |
| 3 | + | |
| 4 | +LL | fn clash(x: u8); |
| 5 | + | ---------------- `clash` previously declared here |
| 6 | +... |
| 7 | +LL | fn clash(x: u64); |
| 8 | + | ^^^^^^^^^^^^^^^^^ this signature doesn't match the previous declaration |
| 9 | + | |
| 10 | +note: the lint level is defined here |
| 11 | + --> $DIR/clashing-extern-fn.rs:4:9 |
| 12 | + | |
| 13 | +LL | #![warn(clashing_extern_decl)] |
| 14 | + | ^^^^^^^^^^^^^^^^^^^^ |
| 15 | + = note: expected `unsafe extern "C" fn(u8)` |
| 16 | + found `unsafe extern "C" fn(u64)` |
| 17 | + |
| 18 | +warning: `extern_fn` redeclared with a different signature |
| 19 | + --> $DIR/clashing-extern-fn.rs:39:9 |
| 20 | + | |
| 21 | +LL | fn extern_fn(x: u64); |
| 22 | + | --------------------- `extern_fn` previously declared here |
| 23 | +... |
| 24 | +LL | fn extern_fn(x: u32); |
| 25 | + | ^^^^^^^^^^^^^^^^^^^^^ this signature doesn't match the previous declaration |
| 26 | + | |
| 27 | + = note: expected `unsafe extern "C" fn(u64)` |
| 28 | + found `unsafe extern "C" fn(u32)` |
| 29 | + |
| 30 | +warning: `extern_link_name` redeclared with a different signature |
| 31 | + --> $DIR/clashing-extern-fn.rs:64:9 |
| 32 | + | |
| 33 | +LL | / #[link_name = "extern_link_name"] |
| 34 | +LL | | fn some_new_name(x: i16); |
| 35 | + | |_____________________________- `extern_link_name` previously declared here |
| 36 | +... |
| 37 | +LL | fn extern_link_name(x: u32); |
| 38 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this signature doesn't match the previous declaration |
| 39 | + | |
| 40 | + = note: expected `unsafe extern "C" fn(i16)` |
| 41 | + found `unsafe extern "C" fn(u32)` |
| 42 | + |
| 43 | +warning: `some_other_extern_link_name` redeclares `some_other_new_name` with a different signature |
| 44 | + --> $DIR/clashing-extern-fn.rs:67:9 |
| 45 | + | |
| 46 | +LL | fn some_other_new_name(x: i16); |
| 47 | + | ------------------------------- `some_other_new_name` previously declared here |
| 48 | +... |
| 49 | +LL | / #[link_name = "some_other_new_name"] |
| 50 | +LL | | |
| 51 | +LL | | fn some_other_extern_link_name(x: u32); |
| 52 | + | |_______________________________________________^ this signature doesn't match the previous declaration |
| 53 | + | |
| 54 | + = note: expected `unsafe extern "C" fn(i16)` |
| 55 | + found `unsafe extern "C" fn(u32)` |
| 56 | + |
| 57 | +warning: `other_both_names_different` redeclares `link_name_same` with a different signature |
| 58 | + --> $DIR/clashing-extern-fn.rs:71:9 |
| 59 | + | |
| 60 | +LL | / #[link_name = "link_name_same"] |
| 61 | +LL | | fn both_names_different(x: i16); |
| 62 | + | |____________________________________- `link_name_same` previously declared here |
| 63 | +... |
| 64 | +LL | / #[link_name = "link_name_same"] |
| 65 | +LL | | |
| 66 | +LL | | fn other_both_names_different(x: u32); |
| 67 | + | |______________________________________________^ this signature doesn't match the previous declaration |
| 68 | + | |
| 69 | + = note: expected `unsafe extern "C" fn(i16)` |
| 70 | + found `unsafe extern "C" fn(u32)` |
| 71 | + |
| 72 | +warning: `different_mod` redeclared with a different signature |
| 73 | + --> $DIR/clashing-extern-fn.rs:84:9 |
| 74 | + | |
| 75 | +LL | fn different_mod(x: u8); |
| 76 | + | ------------------------ `different_mod` previously declared here |
| 77 | +... |
| 78 | +LL | fn different_mod(x: u64); |
| 79 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^ this signature doesn't match the previous declaration |
| 80 | + | |
| 81 | + = note: expected `unsafe extern "C" fn(u8)` |
| 82 | + found `unsafe extern "C" fn(u64)` |
| 83 | + |
| 84 | +warning: `variadic_decl` redeclared with a different signature |
| 85 | + --> $DIR/clashing-extern-fn.rs:94:9 |
| 86 | + | |
| 87 | +LL | fn variadic_decl(x: u8, ...); |
| 88 | + | ----------------------------- `variadic_decl` previously declared here |
| 89 | +... |
| 90 | +LL | fn variadic_decl(x: u8); |
| 91 | + | ^^^^^^^^^^^^^^^^^^^^^^^^ this signature doesn't match the previous declaration |
| 92 | + | |
| 93 | + = note: expected `unsafe extern "C" fn(u8, ...)` |
| 94 | + found `unsafe extern "C" fn(u8)` |
| 95 | + |
| 96 | +warning: `weigh_banana` redeclared with a different signature |
| 97 | + --> $DIR/clashing-extern-fn.rs:137:22 |
| 98 | + | |
| 99 | +LL | extern "C" { fn weigh_banana(count: *const Banana) -> u64; } |
| 100 | + | --------------------------------------------- `weigh_banana` previously declared here |
| 101 | +... |
| 102 | +LL | extern "C" { fn weigh_banana(count: *const Banana) -> u64; } |
| 103 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this signature doesn't match the previous declaration |
| 104 | + | |
| 105 | + = note: expected `unsafe extern "C" fn(*const banana::one::Banana) -> u64` |
| 106 | + found `unsafe extern "C" fn(*const banana::three::Banana) -> u64` |
| 107 | + |
| 108 | +warning: `draw_point` redeclared with a different signature |
| 109 | + --> $DIR/clashing-extern-fn.rs:157:22 |
| 110 | + | |
| 111 | +LL | extern "C" { fn draw_point(p: Point); } |
| 112 | + | ------------------------ `draw_point` previously declared here |
| 113 | +... |
| 114 | +LL | extern "C" { fn draw_point(p: Point); } |
| 115 | + | ^^^^^^^^^^^^^^^^^^^^^^^^ this signature doesn't match the previous declaration |
| 116 | + | |
| 117 | + = note: expected `unsafe extern "C" fn(sameish_members::a::Point)` |
| 118 | + found `unsafe extern "C" fn(sameish_members::b::Point)` |
| 119 | + |
| 120 | +warning: 9 warnings emitted |
| 121 | + |
0 commit comments