Fix assumption in mut.rs that op overloading breaks

Closes #1733
This commit is contained in:
Marijn Haverbeke 2012-02-02 08:11:20 +01:00
parent 2b67de06c8
commit 743c62e1ce

View file

@ -78,10 +78,7 @@ fn expr_root(tcx: ty::ctxt, ex: @expr, autoderef: bool) ->
ty::ty_str {
ds += [@{mut: false, kind: index, outer_t: auto_unbox.t}];
}
_ {
tcx.sess.span_bug(base.span, "Ill-typed base expression in \
index");
}
_ { break; }
}
ds += auto_unbox.ds;
ex = base;