]> git.lizzy.rs Git - rust.git/blob - src/test/ui/parser/bounds-type.rs
Merge commit 'fdb84cbfd25908df5683f8f62388f663d9260e39' into clippyup
[rust.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() {}