Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 14b6223

Browse files
committedJun 17, 2024
Remove windows-specific copy of test
1 parent 7a52206 commit 14b6223

5 files changed

+10
-88
lines changed
 

‎tests/ui/coercion/coerce-issue-49593-box-never-windows.nofallback.stderr

-19
This file was deleted.

‎tests/ui/coercion/coerce-issue-49593-box-never-windows.rs

-58
This file was deleted.

‎tests/ui/coercion/coerce-issue-49593-box-never.fallback.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0277]: the trait bound `(): std::error::Error` is not satisfied
2-
--> $DIR/coerce-issue-49593-box-never.rs:19:5
2+
--> $DIR/coerce-issue-49593-box-never.rs:18:5
33
|
44
LL | Box::<_ /* ! */>::new(x)
55
| ^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::error::Error` is not implemented for `()`

‎tests/ui/coercion/coerce-issue-49593-box-never.nofallback.stderr

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
error[E0277]: the trait bound `(): std::error::Error` is not satisfied
2-
--> $DIR/coerce-issue-49593-box-never.rs:19:5
2+
--> $DIR/coerce-issue-49593-box-never.rs:18:5
33
|
44
LL | Box::<_ /* ! */>::new(x)
55
| ^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::error::Error` is not implemented for `()`
66
|
77
= note: required for the cast from `Box<()>` to `Box<(dyn std::error::Error + 'static)>`
88

99
error[E0277]: the trait bound `(): std::error::Error` is not satisfied
10-
--> $DIR/coerce-issue-49593-box-never.rs:24:49
10+
--> $DIR/coerce-issue-49593-box-never.rs:24:5
1111
|
12-
LL | /* *mut $0 is coerced to *mut Error here */ raw_ptr_box::<_ /* ! */>(x)
13-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::error::Error` is not implemented for `()`
12+
LL | raw_ptr_box::<_ /* ! */>(x)
13+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::error::Error` is not implemented for `()`
1414
|
1515
= note: required for the cast from `*mut ()` to `*mut (dyn std::error::Error + 'static)`
1616

‎tests/ui/coercion/coerce-issue-49593-box-never.rs

+5-6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
//@ revisions: nofallback fallback
2-
//@ ignore-windows - the number of `Error` impls is platform-dependent
32
//@check-fail
43

54
#![feature(never_type)]
@@ -21,13 +20,14 @@ fn foo(x: !) -> Box<dyn Error> {
2120
}
2221

2322
fn foo_raw_ptr(x: !) -> *mut dyn Error {
24-
/* *mut $0 is coerced to *mut Error here */ raw_ptr_box::<_ /* ! */>(x)
23+
/* *mut $0 is coerced to *mut Error here */
24+
raw_ptr_box::<_ /* ! */>(x)
2525
//[nofallback]~^ ERROR trait bound `(): std::error::Error` is not satisfied
2626
}
2727

2828
fn no_coercion(d: *mut dyn Error) -> *mut dyn Error {
2929
/* an unsize coercion won't compile here, and it is indeed not used
30-
because there is nothing requiring the _ to be Sized */
30+
because there is nothing requiring the _ to be Sized */
3131
d as *mut _
3232
}
3333

@@ -50,10 +50,9 @@ fn foo_no_never() {
5050
first_iter = true;
5151
}
5252

53-
let mut y : Option<S> = None;
53+
let mut y: Option<S> = None;
5454
// assert types are equal
5555
mem::swap(&mut x, &mut y);
5656
}
5757

58-
fn main() {
59-
}
58+
fn main() {}

0 commit comments

Comments
 (0)
Failed to load comments.