]> git.proxmox.com Git - rustc.git/blob - src/test/ui/lint/clashing-extern-fn.stderr
New upstream version 1.48.0~beta.8+dfsg1
[rustc.git] / src / test / ui / lint / clashing-extern-fn.stderr
1 warning: `clash` redeclared with a different signature
2 --> $DIR/clashing-extern-fn.rs:14:13
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_declarations)]
14 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
15 = note: expected `unsafe extern "C" fn(u8)`
16 found `unsafe extern "C" fn(u64)`
17
18 warning: `extern_link_name` redeclared with a different signature
19 --> $DIR/clashing-extern-fn.rs:52:9
20 |
21 LL | / #[link_name = "extern_link_name"]
22 LL | | fn some_new_name(x: i16);
23 | |_____________________________- `extern_link_name` previously declared here
24 ...
25 LL | 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
31 warning: `some_other_extern_link_name` redeclares `some_other_new_name` with a different signature
32 --> $DIR/clashing-extern-fn.rs:55:9
33 |
34 LL | fn some_other_new_name(x: i16);
35 | ------------------------------- `some_other_new_name` previously declared here
36 ...
37 LL | / #[link_name = "some_other_new_name"]
38 LL | |
39 LL | | 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
45 warning: `other_both_names_different` redeclares `link_name_same` with a different signature
46 --> $DIR/clashing-extern-fn.rs:59:9
47 |
48 LL | / #[link_name = "link_name_same"]
49 LL | | fn both_names_different(x: i16);
50 | |____________________________________- `link_name_same` previously declared here
51 ...
52 LL | / #[link_name = "link_name_same"]
53 LL | |
54 LL | | 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
60 warning: `different_mod` redeclared with a different signature
61 --> $DIR/clashing-extern-fn.rs:72:9
62 |
63 LL | fn different_mod(x: u8);
64 | ------------------------ `different_mod` previously declared here
65 ...
66 LL | 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
72 warning: `variadic_decl` redeclared with a different signature
73 --> $DIR/clashing-extern-fn.rs:82:9
74 |
75 LL | fn variadic_decl(x: u8, ...);
76 | ----------------------------- `variadic_decl` previously declared here
77 ...
78 LL | 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
84 warning: `weigh_banana` redeclared with a different signature
85 --> $DIR/clashing-extern-fn.rs:142:13
86 |
87 LL | fn weigh_banana(count: *const Banana) -> u64;
88 | --------------------------------------------- `weigh_banana` previously declared here
89 ...
90 LL | fn weigh_banana(count: *const Banana) -> u64;
91 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this signature doesn't match the previous declaration
92 |
93 = note: expected `unsafe extern "C" fn(*const one::Banana) -> u64`
94 found `unsafe extern "C" fn(*const three::Banana) -> u64`
95
96 warning: `draw_point` redeclared with a different signature
97 --> $DIR/clashing-extern-fn.rs:171:13
98 |
99 LL | fn draw_point(p: Point);
100 | ------------------------ `draw_point` previously declared here
101 ...
102 LL | 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
108 warning: `origin` redeclared with a different signature
109 --> $DIR/clashing-extern-fn.rs:197:13
110 |
111 LL | fn origin() -> Point3;
112 | ---------------------- `origin` previously declared here
113 ...
114 LL | fn origin() -> Point3;
115 | ^^^^^^^^^^^^^^^^^^^^^^ this signature doesn't match the previous declaration
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
120 warning: `transparent_incorrect` redeclared with a different signature
121 --> $DIR/clashing-extern-fn.rs:220:13
122 |
123 LL | fn transparent_incorrect() -> T;
124 | -------------------------------- `transparent_incorrect` previously declared here
125 ...
126 LL | fn transparent_incorrect() -> isize;
127 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this signature doesn't match the previous declaration
128 |
129 = note: expected `unsafe extern "C" fn() -> T`
130 found `unsafe extern "C" fn() -> isize`
131
132 warning: `missing_return_type` redeclared with a different signature
133 --> $DIR/clashing-extern-fn.rs:238:13
134 |
135 LL | fn missing_return_type() -> usize;
136 | ---------------------------------- `missing_return_type` previously declared here
137 ...
138 LL | 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
144 warning: `non_zero_usize` redeclared with a different signature
145 --> $DIR/clashing-extern-fn.rs:256:13
146 |
147 LL | fn non_zero_usize() -> core::num::NonZeroUsize;
148 | ----------------------------------------------- `non_zero_usize` previously declared here
149 ...
150 LL | fn non_zero_usize() -> usize;
151 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this signature doesn't match the previous declaration
152 |
153 = note: expected `unsafe extern "C" fn() -> NonZeroUsize`
154 found `unsafe extern "C" fn() -> usize`
155
156 warning: `non_null_ptr` redeclared with a different signature
157 --> $DIR/clashing-extern-fn.rs:258:13
158 |
159 LL | fn non_null_ptr() -> core::ptr::NonNull<usize>;
160 | ----------------------------------------------- `non_null_ptr` previously declared here
161 ...
162 LL | fn non_null_ptr() -> *const usize;
163 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this signature doesn't match the previous declaration
164 |
165 = note: expected `unsafe extern "C" fn() -> NonNull<usize>`
166 found `unsafe extern "C" fn() -> *const usize`
167
168 warning: `option_non_zero_usize_incorrect` redeclared with a different signature
169 --> $DIR/clashing-extern-fn.rs:356:13
170 |
171 LL | fn option_non_zero_usize_incorrect() -> usize;
172 | ---------------------------------------------- `option_non_zero_usize_incorrect` previously declared here
173 ...
174 LL | 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
180 warning: `option_non_null_ptr_incorrect` redeclared with a different signature
181 --> $DIR/clashing-extern-fn.rs:358:13
182 |
183 LL | fn option_non_null_ptr_incorrect() -> *const usize;
184 | --------------------------------------------------- `option_non_null_ptr_incorrect` previously declared here
185 ...
186 LL | 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
192 warning: 15 warnings emitted
193