]> git.proxmox.com Git - rustc.git/blob - src/test/ui/parser/bounds-type.rs
New upstream version 1.56.0~beta.4+dfsg1
[rustc.git] / src / test / ui / parser / bounds-type.rs
1 // compile-flags: -Z parse-only
2
3 struct S<
4 T: 'a + Tr, // OK
5 T: Tr + 'a, // OK
6 T: 'a, // OK
7 T:, // OK
8 T: ?for<'a> Trait, // OK
9 T: Tr +, // OK
10 T: ?'a, //~ ERROR `?` may only modify trait bounds, not lifetime bounds
11
12 T: ~const Tr, // OK
13 T: ~const ?Tr, // OK
14 T: ~const Tr + 'a, // OK
15 T: ~const 'a, //~ ERROR `~const` may only modify trait bounds, not lifetime bounds
16 >;
17
18 fn main() {}