aboutsummaryrefslogtreecommitdiff
path: root/src/comp/middle/trans.rs
diff options
context:
space:
mode:
authorPatrick Walton <[email protected]>2011-04-20 11:59:10 -0700
committerPatrick Walton <[email protected]>2011-04-20 11:59:10 -0700
commitcac7524c1aa63961973e3607d72a49dfccb09448 (patch)
tree1412cd27f95bafd462485fd11e37eba11778f59a /src/comp/middle/trans.rs
parentrustc: Remove all uses of plain_ty() and friends from outside of ty.rs (diff)
downloadrust-cac7524c1aa63961973e3607d72a49dfccb09448.tar.xz
rust-cac7524c1aa63961973e3607d72a49dfccb09448.zip
rustc: Remove all manual type construction outside ty.rs
Diffstat (limited to 'src/comp/middle/trans.rs')
-rw-r--r--src/comp/middle/trans.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/comp/middle/trans.rs b/src/comp/middle/trans.rs
index fbdbf0b2..439e563e 100644
--- a/src/comp/middle/trans.rs
+++ b/src/comp/middle/trans.rs
@@ -2843,12 +2843,12 @@ fn trans_lit(@crate_ctxt cx, &ast.lit lit, &ast.ann ann) -> ValueRef {
fn target_type(@crate_ctxt cx, @ty.t t) -> @ty.t {
alt (t.struct) {
case (ty.ty_int) {
- auto tm = ty.ty_machine(cx.sess.get_targ_cfg().int_type);
- ret @rec(struct=tm with *t);
+ auto struct_ty = ty.mk_mach(cx.sess.get_targ_cfg().int_type);
+ ret ty.copy_cname(struct_ty, t);
}
case (ty.ty_uint) {
- auto tm = ty.ty_machine(cx.sess.get_targ_cfg().uint_type);
- ret @rec(struct=tm with *t);
+ auto struct_ty = ty.mk_mach(cx.sess.get_targ_cfg().uint_type);
+ ret ty.copy_cname(struct_ty, t);
}
case (_) { /* fall through */ }
}