]> git.lizzy.rs Git - rust.git/blob - tests/ui/parser/type-alias-where-fixable.fixed
Rollup merge of #106446 - bzEq:fix-unwind-lsda, r=Amanieu
[rust.git] / tests / ui / parser / type-alias-where-fixable.fixed
1 // check-pass
2 // run-rustfix
3
4 trait Trait {
5     // Fine.
6     type Assoc where u32: Copy;
7     // Fine.
8     type Assoc2 where u32: Copy, i32: Copy;
9 }
10
11 impl Trait for u32 {
12     // Not fine, suggests moving.
13     type Assoc  = () where u32: Copy;
14     //~^ WARNING where clause not allowed here
15     // Not fine, suggests moving `u32: Copy`
16     type Assoc2  = () where i32: Copy, u32: Copy;
17     //~^ WARNING where clause not allowed here
18 }
19
20 impl Trait for i32 {
21     // Fine.
22     type Assoc = () where u32: Copy;
23     // Not fine, suggests moving both.
24     type Assoc2  = () where u32: Copy, i32: Copy;
25     //~^ WARNING where clause not allowed here
26 }
27
28 fn main() {}