You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
trait A {
fn a<X, Y>(c: X);
}
struct B {
x: int;
}
impl B: A {
fn a<Y, X>(c: X) {}
}
This fails with:
/Users/TimChevalier/rust/src/test/run-pass/issue-2611-2.rs:15:2: 15:21 error: method `a` has an incompatible type: expected type parameter but found type parameter
/Users/TimChevalier/rust/src/test/run-pass/issue-2611-2.rs:15 fn a<Y, X>(c: X) {}
^~~~~~~~~~~~~~~~~~~
I think it should pass, since simply reordering the ty param bindings doesn't change meaning. It would be kind of a pain to fix this right now since ty params are still positional.
The text was updated successfully, but these errors were encountered:
Indeed the order does matter. There are many subtle cases to consider and allowing arbitrary re-ordering is quite a complication. I'd be inclined to mark this as a Won't Fix, myself.
This fails with:
I think it should pass, since simply reordering the ty param bindings doesn't change meaning. It would be kind of a pain to fix this right now since ty params are still positional.
The text was updated successfully, but these errors were encountered: