Skip to content

Commit 2adf60c

Browse files
committed
add revisions
1 parent fbd1a87 commit 2adf60c

6 files changed

+34
-7
lines changed

tests/ui/type-alias-impl-trait/self-referential-2.stderr renamed to tests/ui/type-alias-impl-trait/self-referential-2.current.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0277]: can't compare `i32` with `Foo`
2-
--> $DIR/self-referential-2.rs:6:13
2+
--> $DIR/self-referential-2.rs:9:13
33
|
44
LL | fn bar() -> Bar {
55
| ^^^ no implementation for `i32 == Foo`
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
1+
// revisions: current next
2+
//[next] compile-flags: -Znext-solver
3+
//[next] check-pass
14
#![feature(type_alias_impl_trait)]
25

36
type Foo = impl std::fmt::Debug;
47
type Bar = impl PartialEq<Foo>;
58

69
fn bar() -> Bar {
7-
42_i32 //~^ ERROR can't compare `i32` with `Foo`
10+
42_i32 //[current]~^ ERROR can't compare `i32` with `Foo`
811
}
912

1013
fn main() {}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
error[E0284]: type annotations needed: cannot satisfy `Foo == _`
2+
--> $DIR/type-alias-impl-trait-tuple.rs:21:24
3+
|
4+
LL | Blah { my_foo: make_foo(), my_u8: 12 }
5+
| ^^^^^^^^^^ cannot satisfy `Foo == _`
6+
7+
error[E0282]: type annotations needed
8+
--> $DIR/type-alias-impl-trait-tuple.rs:24:28
9+
|
10+
LL | fn into_inner(self) -> (Foo, u8, Foo) {
11+
| ^^^^^^^^^^^^^^ cannot infer type for tuple `(Foo, u8, Foo)`
12+
13+
error: aborting due to 2 previous errors
14+
15+
Some errors have detailed explanations: E0282, E0284.
16+
For more information about an error, try `rustc --explain E0282`.

tests/ui/type-alias-impl-trait/type-alias-impl-trait-tuple.rs

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
// check-pass
1+
// revisions: current next
2+
//[next] compile-flags: -Znext-solver
3+
//[current] check-pass
24

35
#![feature(type_alias_impl_trait)]
46
#![allow(dead_code)]
@@ -17,8 +19,10 @@ struct Blah {
1719
impl Blah {
1820
fn new() -> Blah {
1921
Blah { my_foo: make_foo(), my_u8: 12 }
22+
//[next]~^ ERROR type annotations needed: cannot satisfy `Foo == _`
2023
}
2124
fn into_inner(self) -> (Foo, u8, Foo) {
25+
//[next]~^ ERROR type annotations needed
2226
(self.my_foo, self.my_u8, make_foo())
2327
}
2428
}

tests/ui/type-alias-impl-trait/type_of_a_let.stderr renamed to tests/ui/type-alias-impl-trait/type_of_a_let.current.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0382]: use of moved value: `x`
2-
--> $DIR/type_of_a_let.rs:16:16
2+
--> $DIR/type_of_a_let.rs:20:16
33
|
44
LL | let x: Foo = 22_u32;
55
| - move occurs because `x` has type `Foo`, which does not implement the `Copy` trait
@@ -9,7 +9,7 @@ LL | same_type((x, y));
99
| ^ value used here after move
1010

1111
error[E0382]: use of moved value: `y`
12-
--> $DIR/type_of_a_let.rs:17:6
12+
--> $DIR/type_of_a_let.rs:21:6
1313
|
1414
LL | let y: Foo = x;
1515
| - move occurs because `y` has type `Foo`, which does not implement the `Copy` trait

tests/ui/type-alias-impl-trait/type_of_a_let.rs

+6-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
// revisions: current next
2+
//[next] compile-flags: -Znext-solver
3+
//[next] check-pass
4+
15
#![feature(type_alias_impl_trait)]
26
#![allow(dead_code)]
37

@@ -13,8 +17,8 @@ fn foo1() -> (u32, Foo) {
1317
fn foo2() -> (u32, Foo) {
1418
let x: Foo = 22_u32;
1519
let y: Foo = x;
16-
same_type((x, y)); //~ ERROR use of moved value
17-
(y, todo!()) //~ ERROR use of moved value
20+
same_type((x, y)); //[current]~ ERROR use of moved value
21+
(y, todo!()) //[current]~ ERROR use of moved value
1822
}
1923

2024
fn same_type<T>(x: (T, T)) {}

0 commit comments

Comments
 (0)