Merge pull request #450 from paulstansifer/quick_error_message_fix_2
Flatten functions and objects in trans::simplify_type.
This commit is contained in:
commit
c515ed13de
@ -1293,6 +1293,20 @@ fn simplifier(@crate_ctxt ccx, ty::t typ) -> ty::t {
|
||||
case (ty::ty_vec(_)) {
|
||||
ret ty::mk_imm_vec(ccx.tcx, ty::mk_nil(ccx.tcx));
|
||||
}
|
||||
case (ty::ty_fn(_,_,_,_)) {
|
||||
ret ty::mk_imm_tup(ccx.tcx,
|
||||
[ty::mk_imm_box(ccx.tcx,
|
||||
ty::mk_nil(ccx.tcx)),
|
||||
ty::mk_imm_box(ccx.tcx,
|
||||
ty::mk_nil(ccx.tcx))]);
|
||||
}
|
||||
case (ty::ty_obj(_)) {
|
||||
ret ty::mk_imm_tup(ccx.tcx,
|
||||
[ty::mk_imm_box(ccx.tcx,
|
||||
ty::mk_nil(ccx.tcx)),
|
||||
ty::mk_imm_box(ccx.tcx,
|
||||
ty::mk_nil(ccx.tcx))]);
|
||||
}
|
||||
case (_) { ret typ; }
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user