]> git.lizzy.rs Git - rust.git/blob - src/test/ui/compare-method/reordered-type-param.rs
Rollup merge of #57107 - mjbshaw:thread_local_test, r=nikomatsakis
[rust.git] / src / test / ui / compare-method / reordered-type-param.rs
1 // Tests that ty params get matched correctly when comparing
2 // an impl against a trait
3 //
4 // cc #26111
5
6 trait A {
7   fn b<C:Clone,D>(&self, x: C) -> C;
8 }
9
10 struct E {
11  f: isize
12 }
13
14 impl A for E {
15   // n.b. The error message is awful -- see #3404
16   fn b<F:Clone,G>(&self, _x: G) -> G { panic!() } //~ ERROR method `b` has an incompatible type
17 }
18
19 fn main() {}