]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-51044.rs
Rollup merge of #91804 - woppopo:const_clone, r=oli-obk
[rust.git] / src / test / ui / issues / issue-51044.rs
1 // run-pass
2 // regression test for issue #50825
3 // Check that the feature gate normalizes associated types.
4
5 #![allow(dead_code)]
6 struct Foo<T>(T);
7 struct Duck;
8 struct Quack;
9
10 trait Hello<A> where A: Animal {
11 }
12
13 trait Animal {
14     type Noise;
15 }
16
17 trait Loud<R>  {
18 }
19
20 impl Loud<Quack> for f32 {
21 }
22
23 impl Animal for Duck {
24     type Noise = Quack;
25 }
26
27 impl Hello<Duck> for Foo<f32> where f32: Loud<<Duck as Animal>::Noise> {
28 }
29
30 fn main() {}