Skip to content

Commit d39d5c1

Browse files
committed
bless some tests that I think got fixed by these changes
1 parent e604f6f commit d39d5c1

6 files changed

Lines changed: 6 additions & 26 deletions

tests/ui/impl-trait/unsized_coercion.next.stderr

Lines changed: 0 additions & 11 deletions
This file was deleted.

tests/ui/impl-trait/unsized_coercion.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
//@ revisions: next old
55
//@[next] compile-flags: -Znext-solver
66
//@[old] check-pass
7+
//@[next] check-pass
78

89
trait Trait {}
910

@@ -12,7 +13,6 @@ impl Trait for u32 {}
1213
fn hello() -> Box<impl Trait> {
1314
if true {
1415
let x = hello();
15-
//[next]~^ ERROR: the size for values of type `dyn Trait` cannot be known at compilation time
1616
let y: Box<dyn Trait> = x;
1717
}
1818
Box::new(1u32)

tests/ui/methods/rigid-alias-bound-is-not-inherent.next.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ note: candidate #1 is defined in the trait `Trait1`
99
|
1010
LL | fn method(&self) {
1111
| ^^^^^^^^^^^^^^^^
12-
note: candidate #2 is defined in the trait `Trait2`
12+
note: candidate #2 is defined in an impl of the trait `Trait2` for the type `T`
1313
--> $DIR/rigid-alias-bound-is-not-inherent.rs:27:5
1414
|
1515
LL | fn method(&self) {

tests/ui/mismatched_types/closure-arg-type-mismatch-issue-45727.current.fixed

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,5 @@ fn main() {
88
//[next]~^^ ERROR expected a `FnMut(&<std::ops::RangeInclusive<{integer}> as Iterator>::Item)` closure, found
99
let _ = (-10..=10).find(|x: &i32| x.signum() == 0);
1010
//[current]~^ ERROR type mismatch in closure arguments
11-
//[next]~^^ ERROR expected `RangeInclusive<{integer}>` to be an iterator that yields `&&i32`, but it yields `{integer}`
12-
//[next]~| ERROR expected a `FnMut(&<std::ops::RangeInclusive<{integer}> as Iterator>::Item)` closure, found
11+
//[next]~^^ ERROR expected a `FnMut(&<std::ops::RangeInclusive<{integer}> as Iterator>::Item)` closure, found
1312
}

tests/ui/mismatched_types/closure-arg-type-mismatch-issue-45727.next.stderr

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,6 @@ LL | let _ = (-10..=10).find(|x: i32| x.signum() == 0);
1212
note: required by a bound in `find`
1313
--> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
1414

15-
error[E0271]: expected `RangeInclusive<{integer}>` to be an iterator that yields `&&i32`, but it yields `{integer}`
16-
--> $DIR/closure-arg-type-mismatch-issue-45727.rs:9:24
17-
|
18-
LL | let _ = (-10..=10).find(|x: &&&i32| x.signum() == 0);
19-
| ^^^^ expected `&&i32`, found integer
20-
2115
error[E0277]: expected a `FnMut(&<std::ops::RangeInclusive<{integer}> as Iterator>::Item)` closure, found `{closure@$DIR/closure-arg-type-mismatch-issue-45727.rs:9:29: 9:40}`
2216
--> $DIR/closure-arg-type-mismatch-issue-45727.rs:9:29
2317
|
@@ -32,7 +26,6 @@ LL | let _ = (-10..=10).find(|x: &&&i32| x.signum() == 0);
3226
note: required by a bound in `find`
3327
--> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
3428

35-
error: aborting due to 3 previous errors
29+
error: aborting due to 2 previous errors
3630

37-
Some errors have detailed explanations: E0271, E0277.
38-
For more information about an error, try `rustc --explain E0271`.
31+
For more information about this error, try `rustc --explain E0277`.

tests/ui/mismatched_types/closure-arg-type-mismatch-issue-45727.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,5 @@ fn main() {
88
//[next]~^^ ERROR expected a `FnMut(&<std::ops::RangeInclusive<{integer}> as Iterator>::Item)` closure, found
99
let _ = (-10..=10).find(|x: &&&i32| x.signum() == 0);
1010
//[current]~^ ERROR type mismatch in closure arguments
11-
//[next]~^^ ERROR expected `RangeInclusive<{integer}>` to be an iterator that yields `&&i32`, but it yields `{integer}`
12-
//[next]~| ERROR expected a `FnMut(&<std::ops::RangeInclusive<{integer}> as Iterator>::Item)` closure, found
11+
//[next]~^^ ERROR expected a `FnMut(&<std::ops::RangeInclusive<{integer}> as Iterator>::Item)` closure, found
1312
}

0 commit comments

Comments
 (0)