Skip to content

Commit 305b1c8

Browse files
committed
Fix small bug in iface self types
Issue #1661
1 parent 888262b commit 305b1c8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/comp/middle/typeck.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -614,7 +614,9 @@ fn compare_impl_method(tcx: ty::ctxt, sp: span, impl_m: ty::method,
614614
} else {
615615
let auto_modes = vec::map2(impl_m.fty.inputs, if_m.fty.inputs, {|i, f|
616616
alt ty::struct(tcx, f.ty) {
617-
ty::ty_param(0u, _) { {mode: ast::by_ref with i} }
617+
ty::ty_param(0u, _) if i.mode == ast::mode_infer {
618+
{mode: ast::by_ref with i}
619+
}
618620
_ { i }
619621
}
620622
});

0 commit comments

Comments
 (0)