]> git.lizzy.rs Git - rust.git/blob - src/test/ui/impl-trait/issue-55872-1.rs
Auto merge of #87324 - asquared31415:named-asm-labels, r=Amanieu
[rust.git] / src / test / ui / impl-trait / issue-55872-1.rs
1 #![feature(type_alias_impl_trait)]
2
3 pub trait Bar {
4     type E: Copy;
5
6     fn foo<T>() -> Self::E;
7 }
8
9 impl<S: Default> Bar for S {
10     type E = impl Copy;
11
12     fn foo<T: Default>() -> Self::E {
13         //~^ ERROR type parameter `T` is part of concrete type but not used in parameter list for the `impl Trait` type alias
14         //~| ERROR impl has stricter requirements than trait
15         //~| ERROR the trait bound `S: Copy` is not satisfied in `(S, T)` [E0277]
16         //~| ERROR the trait bound `T: Copy` is not satisfied in `(S, T)` [E0277]
17         (S::default(), T::default())
18     }
19 }
20
21 fn main() {}