]> git.lizzy.rs Git - rust.git/blobdiff - src/test/ui/type-alias-impl-trait/type_of_a_let.rs
Auto merge of #95454 - randomicon00:fix95444, r=wesleywiser
[rust.git] / src / test / ui / type-alias-impl-trait / type_of_a_let.rs
index 7f8e6127cca3b2faf3b078c5bb6f34823fe1e857..4e9d1788b94d833e6fca30adec602bbdaf3a141c 100644 (file)
@@ -1,27 +1,20 @@
 #![feature(type_alias_impl_trait)]
 #![allow(dead_code)]
 
-// FIXME This should compile, but it currently doesn't
-
 use std::fmt::Debug;
 
 type Foo = impl Debug;
-//~^ ERROR: could not find defining uses
 
 fn foo1() -> u32 {
     let x: Foo = 22_u32;
-    //~^ ERROR: mismatched types [E0308]
     x
-    //~^ ERROR: mismatched types [E0308]
 }
 
 fn foo2() -> u32 {
     let x: Foo = 22_u32;
-    //~^ ERROR: mismatched types [E0308]
     let y: Foo = x;
-    same_type((x, y));
-    y
-    //~^ ERROR: mismatched types [E0308]
+    same_type((x, y)); //~ ERROR use of moved value
+    y //~ ERROR use of moved value
 }
 
 fn same_type<T>(x: (T, T)) {}