@@ -105,8 +105,20 @@ LL | fn draw_point(p: Point);
105
105
= note: expected `unsafe extern "C" fn(sameish_members::a::Point)`
106
106
found `unsafe extern "C" fn(sameish_members::b::Point)`
107
107
108
+ warning: `origin` redeclared with a different signature
109
+ --> $DIR/clashing-extern-fn.rs:194:22
110
+ |
111
+ LL | extern "C" { fn origin() -> Point3; }
112
+ | ---------------------- `origin` previously declared here
113
+ ...
114
+ LL | extern "C" { 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
+
108
120
warning: `transparent_incorrect` redeclared with a different signature
109
- --> $DIR/clashing-extern-fn.rs:195 :13
121
+ --> $DIR/clashing-extern-fn.rs:217 :13
110
122
|
111
123
LL | fn transparent_incorrect() -> T;
112
124
| -------------------------------- `transparent_incorrect` previously declared here
@@ -118,7 +130,7 @@ LL | fn transparent_incorrect() -> isize;
118
130
found `unsafe extern "C" fn() -> isize`
119
131
120
132
warning: `missing_return_type` redeclared with a different signature
121
- --> $DIR/clashing-extern-fn.rs:213 :13
133
+ --> $DIR/clashing-extern-fn.rs:235 :13
122
134
|
123
135
LL | fn missing_return_type() -> usize;
124
136
| ---------------------------------- `missing_return_type` previously declared here
@@ -130,7 +142,7 @@ LL | fn missing_return_type();
130
142
found `unsafe extern "C" fn()`
131
143
132
144
warning: `non_zero_usize` redeclared with a different signature
133
- --> $DIR/clashing-extern-fn.rs:231 :13
145
+ --> $DIR/clashing-extern-fn.rs:253 :13
134
146
|
135
147
LL | fn non_zero_usize() -> core::num::NonZeroUsize;
136
148
| ----------------------------------------------- `non_zero_usize` previously declared here
@@ -142,7 +154,7 @@ LL | fn non_zero_usize() -> usize;
142
154
found `unsafe extern "C" fn() -> usize`
143
155
144
156
warning: `non_null_ptr` redeclared with a different signature
145
- --> $DIR/clashing-extern-fn.rs:233 :13
157
+ --> $DIR/clashing-extern-fn.rs:255 :13
146
158
|
147
159
LL | fn non_null_ptr() -> core::ptr::NonNull<usize>;
148
160
| ----------------------------------------------- `non_null_ptr` previously declared here
@@ -154,7 +166,7 @@ LL | fn non_null_ptr() -> *const usize;
154
166
found `unsafe extern "C" fn() -> *const usize`
155
167
156
168
warning: `option_non_zero_usize_incorrect` redeclared with a different signature
157
- --> $DIR/clashing-extern-fn.rs:259 :13
169
+ --> $DIR/clashing-extern-fn.rs:281 :13
158
170
|
159
171
LL | fn option_non_zero_usize_incorrect() -> usize;
160
172
| ---------------------------------------------- `option_non_zero_usize_incorrect` previously declared here
@@ -166,7 +178,7 @@ LL | fn option_non_zero_usize_incorrect() -> isize;
166
178
found `unsafe extern "C" fn() -> isize`
167
179
168
180
warning: `option_non_null_ptr_incorrect` redeclared with a different signature
169
- --> $DIR/clashing-extern-fn.rs:261 :13
181
+ --> $DIR/clashing-extern-fn.rs:283 :13
170
182
|
171
183
LL | fn option_non_null_ptr_incorrect() -> *const usize;
172
184
| --------------------------------------------------- `option_non_null_ptr_incorrect` previously declared here
@@ -177,5 +189,5 @@ LL | fn option_non_null_ptr_incorrect() -> *const isize;
177
189
= note: expected `unsafe extern "C" fn() -> *const usize`
178
190
found `unsafe extern "C" fn() -> *const isize`
179
191
180
- warning: 14 warnings emitted
192
+ warning: 15 warnings emitted
181
193
0 commit comments