2012-09-05 17:36:11 -05:00
|
|
|
// Tests that ty params get matched correctly when comparing
|
|
|
|
// an impl against a trait
|
2012-09-07 20:08:21 -05:00
|
|
|
use iter::BaseIter;
|
2012-09-05 17:36:11 -05:00
|
|
|
|
|
|
|
trait A {
|
2012-09-07 16:52:28 -05:00
|
|
|
fn b<C:Copy, D>(x: C) -> C;
|
2012-09-05 17:36:11 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
struct E {
|
2012-09-07 16:50:47 -05:00
|
|
|
f: int
|
2012-09-05 17:36:11 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
impl E: A {
|
|
|
|
// n.b. The error message is awful -- see #3404
|
2012-09-07 16:52:28 -05:00
|
|
|
fn b<F:Copy, G>(_x: G) -> G { fail } //~ ERROR method `b` has an incompatible type
|
2012-09-05 17:36:11 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {}
|