Skip to content

Commit feacfec

Browse files
tests: Fixup clashing-extern-fn for absence of power-alignment lint
1 parent 6abc782 commit feacfec

File tree

2 files changed

+13
-14
lines changed

2 files changed

+13
-14
lines changed

tests/ui/lint/clashing-extern-fn.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,6 @@ mod sameish_members {
248248

249249
mod same_sized_members_clash {
250250
mod a {
251-
#[allow(uses_power_alignment)]
252251
#[repr(C)]
253252
struct Point3 {
254253
x: f32,

tests/ui/lint/clashing-extern-fn.stderr

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
warning: `extern` block uses type `Option<TransparentNoNiche>`, which is not FFI-safe
2-
--> $DIR/clashing-extern-fn.rs:483:55
2+
--> $DIR/clashing-extern-fn.rs:482:55
33
|
44
LL | fn hidden_niche_transparent_no_niche() -> Option<TransparentNoNiche>;
55
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
@@ -9,7 +9,7 @@ LL | fn hidden_niche_transparent_no_niche() -> Option<TransparentNoN
99
= note: `#[warn(improper_ctypes)]` on by default
1010

1111
warning: `extern` block uses type `Option<UnsafeCell<NonZero<usize>>>`, which is not FFI-safe
12-
--> $DIR/clashing-extern-fn.rs:487:46
12+
--> $DIR/clashing-extern-fn.rs:486:46
1313
|
1414
LL | fn hidden_niche_unsafe_cell() -> Option<UnsafeCell<NonZero<usize>>>;
1515
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
@@ -18,7 +18,7 @@ LL | fn hidden_niche_unsafe_cell() -> Option<UnsafeCell<NonZero<usiz
1818
= note: enum has no representation hint
1919

2020
warning: `extern` block uses type `Option<(usize) is 0..>`, which is not FFI-safe
21-
--> $DIR/clashing-extern-fn.rs:502:54
21+
--> $DIR/clashing-extern-fn.rs:501:54
2222
|
2323
LL | fn pt_non_zero_usize_opt_full_range() -> Option<pattern_type!(usize is 0..)>;
2424
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
@@ -160,7 +160,7 @@ LL | fn draw_point(p: Point);
160160
found `unsafe extern "C" fn(sameish_members::b::Point)`
161161

162162
warning: `origin` redeclared with a different signature
163-
--> $DIR/clashing-extern-fn.rs:270:13
163+
--> $DIR/clashing-extern-fn.rs:269:13
164164
|
165165
LL | fn origin() -> Point3;
166166
| ---------------------- `origin` previously declared here
@@ -172,7 +172,7 @@ LL | fn origin() -> Point3;
172172
found `unsafe extern "C" fn() -> same_sized_members_clash::b::Point3`
173173

174174
warning: `transparent_incorrect` redeclared with a different signature
175-
--> $DIR/clashing-extern-fn.rs:293:13
175+
--> $DIR/clashing-extern-fn.rs:292:13
176176
|
177177
LL | fn transparent_incorrect() -> T;
178178
| -------------------------------- `transparent_incorrect` previously declared here
@@ -184,7 +184,7 @@ LL | fn transparent_incorrect() -> isize;
184184
found `unsafe extern "C" fn() -> isize`
185185

186186
warning: `missing_return_type` redeclared with a different signature
187-
--> $DIR/clashing-extern-fn.rs:311:13
187+
--> $DIR/clashing-extern-fn.rs:310:13
188188
|
189189
LL | fn missing_return_type() -> usize;
190190
| ---------------------------------- `missing_return_type` previously declared here
@@ -196,7 +196,7 @@ LL | fn missing_return_type();
196196
found `unsafe extern "C" fn()`
197197

198198
warning: `non_zero_usize` redeclared with a different signature
199-
--> $DIR/clashing-extern-fn.rs:329:13
199+
--> $DIR/clashing-extern-fn.rs:328:13
200200
|
201201
LL | fn non_zero_usize() -> core::num::NonZero<usize>;
202202
| ------------------------------------------------- `non_zero_usize` previously declared here
@@ -208,7 +208,7 @@ LL | fn non_zero_usize() -> usize;
208208
found `unsafe extern "C" fn() -> usize`
209209

210210
warning: `non_null_ptr` redeclared with a different signature
211-
--> $DIR/clashing-extern-fn.rs:331:13
211+
--> $DIR/clashing-extern-fn.rs:330:13
212212
|
213213
LL | fn non_null_ptr() -> core::ptr::NonNull<usize>;
214214
| ----------------------------------------------- `non_null_ptr` previously declared here
@@ -220,7 +220,7 @@ LL | fn non_null_ptr() -> *const usize;
220220
found `unsafe extern "C" fn() -> *const usize`
221221

222222
warning: `option_non_zero_usize_incorrect` redeclared with a different signature
223-
--> $DIR/clashing-extern-fn.rs:425:13
223+
--> $DIR/clashing-extern-fn.rs:424:13
224224
|
225225
LL | fn option_non_zero_usize_incorrect() -> usize;
226226
| ---------------------------------------------- `option_non_zero_usize_incorrect` previously declared here
@@ -232,7 +232,7 @@ LL | fn option_non_zero_usize_incorrect() -> isize;
232232
found `unsafe extern "C" fn() -> isize`
233233

234234
warning: `option_non_null_ptr_incorrect` redeclared with a different signature
235-
--> $DIR/clashing-extern-fn.rs:427:13
235+
--> $DIR/clashing-extern-fn.rs:426:13
236236
|
237237
LL | fn option_non_null_ptr_incorrect() -> *const usize;
238238
| --------------------------------------------------- `option_non_null_ptr_incorrect` previously declared here
@@ -244,7 +244,7 @@ LL | fn option_non_null_ptr_incorrect() -> *const isize;
244244
found `unsafe extern "C" fn() -> *const isize`
245245

246246
warning: `hidden_niche_transparent_no_niche` redeclared with a different signature
247-
--> $DIR/clashing-extern-fn.rs:483:13
247+
--> $DIR/clashing-extern-fn.rs:482:13
248248
|
249249
LL | fn hidden_niche_transparent_no_niche() -> usize;
250250
| ------------------------------------------------ `hidden_niche_transparent_no_niche` previously declared here
@@ -256,7 +256,7 @@ LL | fn hidden_niche_transparent_no_niche() -> Option<TransparentNoN
256256
found `unsafe extern "C" fn() -> Option<TransparentNoNiche>`
257257

258258
warning: `hidden_niche_unsafe_cell` redeclared with a different signature
259-
--> $DIR/clashing-extern-fn.rs:487:13
259+
--> $DIR/clashing-extern-fn.rs:486:13
260260
|
261261
LL | fn hidden_niche_unsafe_cell() -> usize;
262262
| --------------------------------------- `hidden_niche_unsafe_cell` previously declared here
@@ -268,7 +268,7 @@ LL | fn hidden_niche_unsafe_cell() -> Option<UnsafeCell<NonZero<usiz
268268
found `unsafe extern "C" fn() -> Option<UnsafeCell<NonZero<usize>>>`
269269

270270
warning: `pt_non_null_ptr` redeclared with a different signature
271-
--> $DIR/clashing-extern-fn.rs:516:13
271+
--> $DIR/clashing-extern-fn.rs:515:13
272272
|
273273
LL | fn pt_non_null_ptr() -> pattern_type!(usize is 1..);
274274
| ---------------------------------------------------- `pt_non_null_ptr` previously declared here

0 commit comments

Comments
 (0)