add revisions
This commit is contained in:
parent
3e3e207ad7
commit
e5541cf895
@ -1,5 +1,5 @@
|
||||
error[E0277]: can't compare `i32` with `Foo`
|
||||
--> $DIR/self-referential-2.rs:6:13
|
||||
--> $DIR/self-referential-2.rs:9:13
|
||||
|
|
||||
LL | fn bar() -> Bar {
|
||||
| ^^^ no implementation for `i32 == Foo`
|
@ -1,10 +1,13 @@
|
||||
// revisions: current next
|
||||
//[next] compile-flags: -Znext-solver
|
||||
//[next] check-pass
|
||||
#![feature(type_alias_impl_trait)]
|
||||
|
||||
type Foo = impl std::fmt::Debug;
|
||||
type Bar = impl PartialEq<Foo>;
|
||||
|
||||
fn bar() -> Bar {
|
||||
42_i32 //~^ ERROR can't compare `i32` with `Foo`
|
||||
42_i32 //[current]~^ ERROR can't compare `i32` with `Foo`
|
||||
}
|
||||
|
||||
fn main() {}
|
||||
|
@ -0,0 +1,16 @@
|
||||
error[E0284]: type annotations needed: cannot satisfy `Foo == _`
|
||||
--> $DIR/type-alias-impl-trait-tuple.rs:21:24
|
||||
|
|
||||
LL | Blah { my_foo: make_foo(), my_u8: 12 }
|
||||
| ^^^^^^^^^^ cannot satisfy `Foo == _`
|
||||
|
||||
error[E0282]: type annotations needed
|
||||
--> $DIR/type-alias-impl-trait-tuple.rs:24:28
|
||||
|
|
||||
LL | fn into_inner(self) -> (Foo, u8, Foo) {
|
||||
| ^^^^^^^^^^^^^^ cannot infer type for tuple `(Foo, u8, Foo)`
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
Some errors have detailed explanations: E0282, E0284.
|
||||
For more information about an error, try `rustc --explain E0282`.
|
@ -1,4 +1,6 @@
|
||||
// check-pass
|
||||
// revisions: current next
|
||||
//[next] compile-flags: -Znext-solver
|
||||
//[current] check-pass
|
||||
|
||||
#![feature(type_alias_impl_trait)]
|
||||
#![allow(dead_code)]
|
||||
@ -17,8 +19,10 @@ struct Blah {
|
||||
impl Blah {
|
||||
fn new() -> Blah {
|
||||
Blah { my_foo: make_foo(), my_u8: 12 }
|
||||
//[next]~^ ERROR type annotations needed: cannot satisfy `Foo == _`
|
||||
}
|
||||
fn into_inner(self) -> (Foo, u8, Foo) {
|
||||
//[next]~^ ERROR type annotations needed
|
||||
(self.my_foo, self.my_u8, make_foo())
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
error[E0382]: use of moved value: `x`
|
||||
--> $DIR/type_of_a_let.rs:16:16
|
||||
--> $DIR/type_of_a_let.rs:20:16
|
||||
|
|
||||
LL | let x: Foo = 22_u32;
|
||||
| - move occurs because `x` has type `Foo`, which does not implement the `Copy` trait
|
||||
@ -9,7 +9,7 @@ LL | same_type((x, y));
|
||||
| ^ value used here after move
|
||||
|
||||
error[E0382]: use of moved value: `y`
|
||||
--> $DIR/type_of_a_let.rs:17:6
|
||||
--> $DIR/type_of_a_let.rs:21:6
|
||||
|
|
||||
LL | let y: Foo = x;
|
||||
| - move occurs because `y` has type `Foo`, which does not implement the `Copy` trait
|
@ -1,3 +1,7 @@
|
||||
// revisions: current next
|
||||
//[next] compile-flags: -Znext-solver
|
||||
//[next] check-pass
|
||||
|
||||
#![feature(type_alias_impl_trait)]
|
||||
#![allow(dead_code)]
|
||||
|
||||
@ -13,8 +17,8 @@ fn foo1() -> (u32, Foo) {
|
||||
fn foo2() -> (u32, Foo) {
|
||||
let x: Foo = 22_u32;
|
||||
let y: Foo = x;
|
||||
same_type((x, y)); //~ ERROR use of moved value
|
||||
(y, todo!()) //~ ERROR use of moved value
|
||||
same_type((x, y)); //[current]~ ERROR use of moved value
|
||||
(y, todo!()) //[current]~ ERROR use of moved value
|
||||
}
|
||||
|
||||
fn same_type<T>(x: (T, T)) {}
|
||||
|
Loading…
Reference in New Issue
Block a user