]> git.proxmox.com Git - rustc.git/blob - src/test/ui/impl-trait/issue-55872-1.rs
New upstream version 1.48.0~beta.8+dfsg1
[rustc.git] / src / test / ui / impl-trait / issue-55872-1.rs
1 // ignore-tidy-linelength
2 #![feature(type_alias_impl_trait)]
3
4 pub trait Bar {
5 type E: Copy;
6
7 fn foo<T>() -> Self::E;
8 }
9
10 impl<S: Default> Bar for S {
11 type E = impl Copy;
12 //~^ ERROR the trait bound `S: Copy` is not satisfied in `(S, T)` [E0277]
13 //~^^ ERROR the trait bound `T: Copy` is not satisfied in `(S, T)` [E0277]
14
15 fn foo<T: Default>() -> Self::E {
16 //~^ ERROR type parameter `T` is part of concrete type but not used in parameter list for the `impl Trait` type alias
17 //~| ERROR impl has stricter requirements than trait
18 (S::default(), T::default())
19 }
20 }
21
22 fn main() {}