Skip to content

Commit 0076756

Browse files
committed
---
yaml --- r: 52317 b: refs/heads/dist-snap c: 293cd34 h: refs/heads/master i: 52315: 9426c66 v: v3
1 parent 5d46fa7 commit 0076756

File tree

27 files changed

+196
-130
lines changed

27 files changed

+196
-130
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c
99
refs/heads/incoming: 44d4d6de762f3f9aae1fedcf454c66b79b3ad58d
10-
refs/heads/dist-snap: 4bcd19f6be51d7fb26b0930c8a3354b9222143ff
10+
refs/heads/dist-snap: 293cd3480c10855de68503db36c6cc3ce8988b54
1111
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1212
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
1313
refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0

branches/dist-snap/src/librustc/front/test.rs

Lines changed: 22 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -340,13 +340,13 @@ fn mk_test_desc_vec_ty(cx: test_ctxt) -> @ast::Ty {
340340
node: ast::ty_path(test_desc_ty_path, cx.sess.next_node_id()),
341341
span: dummy_sp()};
342342

343-
let vec_mt: ast::mt = {ty: @test_desc_ty, mutbl: ast::m_imm};
343+
let vec_mt = ast::mt {ty: @test_desc_ty, mutbl: ast::m_imm};
344344

345345
let inner_ty = @{id: cx.sess.next_node_id(),
346346
node: ast::ty_vec(vec_mt),
347347
span: dummy_sp()};
348348
return @{id: cx.sess.next_node_id(),
349-
node: ast::ty_uniq({ty: inner_ty, mutbl: ast::m_imm}),
349+
node: ast::ty_uniq(ast::mt {ty: inner_ty, mutbl: ast::m_imm}),
350350
span: dummy_sp()};
351351
}
352352

@@ -389,9 +389,11 @@ fn mk_test_desc_rec(cx: test_ctxt, test: test) -> @ast::expr {
389389
span: dummy_sp()};
390390

391391

392-
let name_field: ast::field =
393-
nospan({mutbl: ast::m_imm, ident: cx.sess.ident_of(~"name"),
394-
expr: @name_expr});
392+
let name_field = nospan(ast::field_ {
393+
mutbl: ast::m_imm,
394+
ident: cx.sess.ident_of(~"name"),
395+
expr: @name_expr,
396+
});
395397

396398
let fn_path = path_node_global(path);
397399

@@ -403,9 +405,11 @@ fn mk_test_desc_rec(cx: test_ctxt, test: test) -> @ast::expr {
403405

404406
let fn_wrapper_expr = mk_test_wrapper(cx, fn_expr, span);
405407

406-
let fn_field: ast::field =
407-
nospan({mutbl: ast::m_imm, ident: cx.sess.ident_of(~"testfn"),
408-
expr: fn_wrapper_expr});
408+
let fn_field = nospan(ast::field_ {
409+
mutbl: ast::m_imm,
410+
ident: cx.sess.ident_of(~"testfn"),
411+
expr: fn_wrapper_expr,
412+
});
409413

410414
let ignore_lit: ast::lit = nospan(ast::lit_bool(test.ignore));
411415

@@ -415,9 +419,11 @@ fn mk_test_desc_rec(cx: test_ctxt, test: test) -> @ast::expr {
415419
node: ast::expr_lit(@ignore_lit),
416420
span: span};
417421

418-
let ignore_field: ast::field =
419-
nospan({mutbl: ast::m_imm, ident: cx.sess.ident_of(~"ignore"),
420-
expr: @ignore_expr});
422+
let ignore_field = nospan(ast::field_ {
423+
mutbl: ast::m_imm,
424+
ident: cx.sess.ident_of(~"ignore"),
425+
expr: @ignore_expr,
426+
});
421427

422428
let fail_lit: ast::lit = nospan(ast::lit_bool(test.should_fail));
423429

@@ -427,10 +433,11 @@ fn mk_test_desc_rec(cx: test_ctxt, test: test) -> @ast::expr {
427433
node: ast::expr_lit(@fail_lit),
428434
span: span};
429435

430-
let fail_field: ast::field =
431-
nospan({mutbl: ast::m_imm,
432-
ident: cx.sess.ident_of(~"should_fail"),
433-
expr: @fail_expr});
436+
let fail_field = nospan(ast::field_ {
437+
mutbl: ast::m_imm,
438+
ident: cx.sess.ident_of(~"should_fail"),
439+
expr: @fail_expr,
440+
});
434441

435442
let test_desc_path =
436443
mk_path(cx, ~[cx.sess.ident_of(~"test"),

branches/dist-snap/src/librustc/metadata/tydecode.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@ fn parse_mt(st: @pstate, conv: conv_did) -> ty::mt {
353353
'?' => { next(st); m = ast::m_const; }
354354
_ => { m = ast::m_imm; }
355355
}
356-
return {ty: parse_ty(st, conv), mutbl: m};
356+
ty::mt { ty: parse_ty(st, conv), mutbl: m }
357357
}
358358

359359
fn parse_def(st: @pstate, conv: conv_did) -> ast::def_id {

branches/dist-snap/src/librustc/middle/mem_categorization.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -728,7 +728,7 @@ impl &mem_categorization_ctxt {
728728
// know what type lies at the other end, so we just call it
729729
// `()` (the empty tuple).
730730

731-
let mt = {ty: ty::mk_tup(self.tcx, ~[]), mutbl: m_imm};
731+
let mt = ty::mt {ty: ty::mk_tup(self.tcx, ~[]), mutbl: m_imm};
732732
return self.cat_deref_common(node, base_cmt, deref_cnt, mt);
733733
}
734734

branches/dist-snap/src/librustc/middle/trans/_match.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -857,7 +857,7 @@ fn extract_vec_elems(bcx: block, pat_id: ast::node_id,
857857
let tail_begin = tvec::pointer_add(bcx, base, tail_offset);
858858
let tail_len = Sub(bcx, len, tail_offset);
859859
let tail_ty = ty::mk_evec(bcx.tcx(),
860-
{ty: vt.unit_ty, mutbl: ast::m_imm},
860+
ty::mt {ty: vt.unit_ty, mutbl: ast::m_imm},
861861
ty::vstore_slice(ty::re_static)
862862
);
863863
let scratch = scratch_datum(bcx, tail_ty, false);

branches/dist-snap/src/librustc/middle/trans/base.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2184,7 +2184,7 @@ fn create_main_wrapper(ccx: @crate_ctxt, sp: span, main_llfn: ValueRef) {
21842184
let unit_ty = ty::mk_estr(ccx.tcx, ty::vstore_uniq);
21852185
let vecarg_ty: ty::arg =
21862186
{mode: ast::expl(ast::by_val),
2187-
ty: ty::mk_evec(ccx.tcx, {ty: unit_ty, mutbl: ast::m_imm},
2187+
ty: ty::mk_evec(ccx.tcx, ty::mt {ty: unit_ty, mutbl: ast::m_imm},
21882188
ty::vstore_uniq)};
21892189
let nt = ty::mk_nil(ccx.tcx);
21902190
let llfty = type_of_fn(ccx, ~[vecarg_ty], nt);

branches/dist-snap/src/librustc/middle/trans/closure.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ fn store_environment(bcx: block,
224224
// tuple. This could be a ptr in uniq or a box or on stack,
225225
// whatever.
226226
let cbox_ty = tuplify_box_ty(tcx, cdata_ty);
227-
let cboxptr_ty = ty::mk_ptr(tcx, {ty:cbox_ty, mutbl:ast::m_imm});
227+
let cboxptr_ty = ty::mk_ptr(tcx, ty::mt {ty:cbox_ty, mutbl:ast::m_imm});
228228

229229
let llbox = PointerCast(bcx, llbox, type_of(ccx, cboxptr_ty));
230230
debug!("tuplify_box_ty = %s", ty_to_str(tcx, cbox_ty));

branches/dist-snap/src/librustc/middle/trans/common.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -945,7 +945,10 @@ fn T_opaque_vec(targ_cfg: @session::config) -> TypeRef {
945945
// representation of @T as a tuple (i.e., the ty::t version of what T_box()
946946
// returns).
947947
fn tuplify_box_ty(tcx: ty::ctxt, t: ty::t) -> ty::t {
948-
let ptr = ty::mk_ptr(tcx, {ty: ty::mk_nil(tcx), mutbl: ast::m_imm});
948+
let ptr = ty::mk_ptr(
949+
tcx,
950+
ty::mt {ty: ty::mk_nil(tcx), mutbl: ast::m_imm}
951+
);
949952
return ty::mk_tup(tcx, ~[ty::mk_uint(tcx), ty::mk_type(tcx),
950953
ptr, ptr,
951954
t]);

branches/dist-snap/src/librustc/middle/trans/expr.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,8 @@ fn trans_to_datum(bcx: block, expr: @ast::expr) -> DatumBlock {
251251

252252
// this type may have a different region/mutability than the
253253
// real one, but it will have the same runtime representation
254-
let slice_ty = ty::mk_evec(tcx, {ty: unit_ty, mutbl: ast::m_imm},
254+
let slice_ty = ty::mk_evec(tcx,
255+
ty::mt { ty: unit_ty, mutbl: ast::m_imm },
255256
ty::vstore_slice(ty::re_static));
256257

257258
let scratch = scratch_datum(bcx, slice_ty, false);

branches/dist-snap/src/librustc/middle/trans/machine.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ use syntax::parse::token::special_idents;
2626
// nominal type that has pointers to itself in it.
2727
pub fn simplify_type(tcx: ty::ctxt, typ: ty::t) -> ty::t {
2828
fn nilptr(tcx: ty::ctxt) -> ty::t {
29-
ty::mk_ptr(tcx, {ty: ty::mk_nil(tcx), mutbl: ast::m_imm})
29+
ty::mk_ptr(tcx, ty::mt {ty: ty::mk_nil(tcx), mutbl: ast::m_imm})
3030
}
3131
fn simplifier(tcx: ty::ctxt, typ: ty::t) -> ty::t {
3232
match ty::get(typ).sty {
@@ -45,13 +45,12 @@ pub fn simplify_type(tcx: ty::ctxt, typ: ty::t) -> ty::t {
4545
let simpl_fields = (if ty::ty_dtor(tcx, did).is_present() {
4646
// remember the drop flag
4747
~[{ident: special_idents::dtor,
48-
mt: {ty: ty::mk_u8(tcx),
49-
mutbl: ast::m_mutbl}}] }
48+
mt: ty::mt {ty: ty::mk_u8(tcx), mutbl: ast::m_mutbl}}] }
5049
else { ~[] }) +
5150
do ty::lookup_struct_fields(tcx, did).map |f| {
5251
let t = ty::lookup_field_type(tcx, did, f.id, substs);
5352
{ident: f.ident,
54-
mt: {ty: simplify_type(tcx, t), mutbl: ast::m_const}}
53+
mt: ty::mt {ty: simplify_type(tcx, t), mutbl: ast::m_const}}
5554
};
5655
ty::mk_rec(tcx, simpl_fields)
5756
}

branches/dist-snap/src/librustc/middle/trans/tvec.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ fn trans_slice_vstore(bcx: block,
214214

215215
// Arrange for the backing array to be cleaned up.
216216
let fixed_ty = ty::mk_evec(bcx.tcx(),
217-
{ty: vt.unit_ty, mutbl: ast::m_mutbl},
217+
ty::mt {ty: vt.unit_ty, mutbl: ast::m_mutbl},
218218
ty::vstore_fixed(count));
219219
let llfixed_ty = T_ptr(type_of::type_of(bcx.ccx(), fixed_ty));
220220
let llfixed_casted = BitCast(bcx, llfixed, llfixed_ty);

0 commit comments

Comments
 (0)