]>
Commit | Line | Data |
---|---|---|
dc9dc135 XL |
1 | #![feature(associated_type_bounds)] |
2 | #![feature(untagged_unions)] | |
3 | ||
4 | struct S1 { f: dyn Iterator<Item: Copy> } | |
e1599b0c | 5 | //~^ ERROR associated type bounds are not allowed within structs, enums, or unions |
dc9dc135 | 6 | struct S2 { f: Box<dyn Iterator<Item: Copy>> } |
e1599b0c | 7 | //~^ ERROR associated type bounds are not allowed within structs, enums, or unions |
dc9dc135 | 8 | struct S3 { f: dyn Iterator<Item: 'static> } |
e1599b0c | 9 | //~^ ERROR associated type bounds are not allowed within structs, enums, or unions |
dc9dc135 XL |
10 | |
11 | enum E1 { V(dyn Iterator<Item: Copy>) } | |
e1599b0c | 12 | //~^ ERROR associated type bounds are not allowed within structs, enums, or unions |
1b1a35ee | 13 | //~| ERROR the size for values of type `(dyn Iterator<Item = impl Copy> + 'static)` |
dc9dc135 | 14 | enum E2 { V(Box<dyn Iterator<Item: Copy>>) } |
e1599b0c | 15 | //~^ ERROR associated type bounds are not allowed within structs, enums, or unions |
dc9dc135 | 16 | enum E3 { V(dyn Iterator<Item: 'static>) } |
e1599b0c | 17 | //~^ ERROR associated type bounds are not allowed within structs, enums, or unions |
1b1a35ee | 18 | //~| ERROR the size for values of type `(dyn Iterator<Item = impl Sized> + 'static)` |
dc9dc135 XL |
19 | |
20 | union U1 { f: dyn Iterator<Item: Copy> } | |
e1599b0c | 21 | //~^ ERROR associated type bounds are not allowed within structs, enums, or unions |
1b1a35ee | 22 | //~| ERROR the size for values of type `(dyn Iterator<Item = impl Copy> + 'static)` |
dc9dc135 | 23 | union U2 { f: Box<dyn Iterator<Item: Copy>> } |
e1599b0c | 24 | //~^ ERROR associated type bounds are not allowed within structs, enums, or unions |
dc9dc135 | 25 | union U3 { f: dyn Iterator<Item: 'static> } |
e1599b0c | 26 | //~^ ERROR associated type bounds are not allowed within structs, enums, or unions |
1b1a35ee | 27 | //~| ERROR the size for values of type `(dyn Iterator<Item = impl Sized> + 'static)` |
e1599b0c XL |
28 | |
29 | fn main() {} |