]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-47715.rs
Merge commit '97e504549371d7640cf011d266e3c17394fdddac' into sync_cg_clif-2021-12-20
[rust.git] / src / test / ui / issues / issue-47715.rs
1 trait Foo {}
2
3 trait Bar<T> {}
4
5 trait Iterable {
6     type Item;
7 }
8
9 struct Container<T: Iterable<Item = impl Foo>> {
10     //~^ ERROR `impl Trait` not allowed
11     field: T
12 }
13
14 enum Enum<T: Iterable<Item = impl Foo>> {
15     //~^ ERROR `impl Trait` not allowed
16     A(T),
17 }
18
19 union Union<T: Iterable<Item = impl Foo> + Copy> {
20     //~^ ERROR `impl Trait` not allowed
21     x: T,
22 }
23
24 type Type<T: Iterable<Item = impl Foo>> = T;
25 //~^ ERROR `impl Trait` not allowed
26
27 fn main() {
28 }