]> git.lizzy.rs Git - rust.git/blobdiff - src/test/ui/type-alias-impl-trait/issue-52843.rs
Check hidden types for well formedness at the definition site instead of only at...
[rust.git] / src / test / ui / type-alias-impl-trait / issue-52843.rs
index b24959d7207200afdd2a19c2fce03982b42ee843..159d3ccd27e0150aca3723c807cd1bd21e2e6889 100644 (file)
@@ -1,11 +1,11 @@
 #![feature(type_alias_impl_trait)]
 
 type Foo<T> = impl Default;
-//~^ ERROR: the trait bound `T: Default` is not satisfied
 
 #[allow(unused)]
 fn foo<T: Default>(t: T) -> Foo<T> {
     t
+    //~^ ERROR: the trait bound `T: Default` is not satisfied
 }
 
 struct NotDefault;