]> git.lizzy.rs Git - rust.git/blob - src/test/ui/parser/item-free-type-bounds-semantic-fail.rs
Merge commit '266e96785ab71834b917bf474f130a6d8fdecd4b' into sync_cg_clif-2022-10-23
[rust.git] / src / test / ui / parser / item-free-type-bounds-semantic-fail.rs
1 fn main() {}
2
3 fn semantics() {
4     type A: Ord;
5     //~^ ERROR bounds on `type`s in this context have no effect
6     //~| ERROR free type alias without body
7     type B: Ord = u8;
8     //~^ ERROR bounds on `type`s in this context have no effect
9     type C: Ord where 'static: 'static = u8;
10     //~^ ERROR bounds on `type`s in this context have no effect
11     type D<_T>: Ord;
12     //~^ ERROR bounds on `type`s in this context have no effect
13     //~| ERROR free type alias without body
14     type E<_T>: Ord = u8;
15     //~^ ERROR bounds on `type`s in this context have no effect
16     //~| ERROR type parameter `_T` is unused
17     type F<_T>: Ord where 'static: 'static = u8;
18     //~^ ERROR bounds on `type`s in this context have no effect
19     //~| ERROR type parameter `_T` is unused
20 }