blob: 4ae4549ea58966346c2d0d6994ae0a8d0407d8c1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
// compile-flags: -Z parse-only
struct S<
T: 'a + Tr, // OK
T: Tr + 'a, // OK
T: 'a, // OK
T:, // OK
T: ?for<'a> Trait, // OK
T: Tr +, // OK
T: ?'a, //~ ERROR `?` may only modify trait bounds, not lifetime bounds
T: ~const Tr, // OK
T: ~const ?Tr, // OK
T: ~const Tr + 'a, // OK
T: ~const 'a, //~ ERROR `~const` may only modify trait bounds, not lifetime bounds
>;
fn main() {}
|