Skip to content

Commit 557f74d

Browse files
committed
---
yaml --- r: 35256 b: refs/heads/master c: 1c348e6 h: refs/heads/master v: v3
1 parent 3b63ff5 commit 557f74d

File tree

16 files changed

+169
-188
lines changed

16 files changed

+169
-188
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: 32763caa600857bc0116a9221e4a94431b5b6907
2+
refs/heads/master: 1c348e6e3832b1fd8282be696f76ac3c50115162
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: eb8fd119c65c67f3b1b8268cc7341c22d39b7b61
55
refs/heads/try: d324a424d8f84b1eb049b12cf34182bda91b0024

trunk/src/librustc/middle/const_eval.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,8 @@ fn classify(e: @expr,
9292
ast::expr_vstore_fixed(_) |
9393
ast::expr_vstore_slice => classify(e, def_map, tcx),
9494
ast::expr_vstore_uniq |
95-
ast::expr_vstore_box => non_const
95+
ast::expr_vstore_box |
96+
ast::expr_vstore_mut_box => non_const
9697
}
9798
}
9899

trunk/src/librustc/middle/trans/base.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1643,7 +1643,7 @@ fn trans_fn(ccx: @crate_ctxt,
16431643
impl_id: Option<ast::def_id>) {
16441644
let do_time = ccx.sess.trans_stats();
16451645
let start = if do_time { time::get_time() }
1646-
else { time::Timespec::new(0, 0) };
1646+
else { {sec: 0i64, nsec: 0i32} };
16471647
debug!("trans_fn(ty_self=%?)", ty_self);
16481648
let _icx = ccx.insn_ctxt("trans_fn");
16491649
ccx.stats.n_fns += 1;

trunk/src/librustc/middle/trans/expr.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,8 @@ fn trans_rvalue_datum_unadjusted(bcx: block, expr: @ast::expr) -> DatumBlock {
392392
trace_span!(bcx, expr.span, shorten(bcx.expr_to_str(expr)));
393393

394394
match expr.node {
395-
ast::expr_vstore(contents, ast::expr_vstore_box) => {
395+
ast::expr_vstore(contents, ast::expr_vstore_box) |
396+
ast::expr_vstore(contents, ast::expr_vstore_mut_box) => {
396397
return tvec::trans_uniq_or_managed_vstore(bcx, heap_shared,
397398
expr, contents);
398399
}

trunk/src/librustc/middle/ty.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3187,6 +3187,7 @@ fn expr_kind(tcx: ctxt,
31873187
ast::expr_addr_of(*) |
31883188
ast::expr_binary(*) |
31893189
ast::expr_vstore(_, ast::expr_vstore_box) |
3190+
ast::expr_vstore(_, ast::expr_vstore_mut_box) |
31903191
ast::expr_vstore(_, ast::expr_vstore_uniq) => {
31913192
RvalueDatumExpr
31923193
}

trunk/src/librustc/middle/typeck/astconv.rs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -176,13 +176,14 @@ fn ast_ty_to_ty<AC: ast_conv, RS: region_scope Copy Owned>(
176176
let tcx = self.tcx();
177177

178178
match a_seq_ty.ty.node {
179-
// to convert to an e{vec,str}, there can't be a
180-
// mutability argument
181-
_ if a_seq_ty.mutbl != ast::m_imm => (),
182179
ast::ty_vec(mt) => {
183-
return ty::mk_evec(tcx, ast_mt_to_mt(self, rscope, mt), vst);
180+
let mut mt = ast_mt_to_mt(self, rscope, mt);
181+
if a_seq_ty.mutbl == ast::m_mutbl {
182+
mt = { ty: mt.ty, mutbl: ast::m_mutbl };
183+
}
184+
return ty::mk_evec(tcx, mt, vst);
184185
}
185-
ast::ty_path(path, id) => {
186+
ast::ty_path(path, id) if a_seq_ty.mutbl == ast::m_imm => {
186187
match tcx.def_map.find(id) {
187188
Some(ast::def_prim_ty(ast::ty_str)) => {
188189
check_path_args(tcx, path, NO_TPS | NO_REGIONS);

trunk/src/librustc/middle/typeck/check.rs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1705,9 +1705,14 @@ fn check_expr_with_unifier(fcx: @fn_ctxt,
17051705
}
17061706
ast::expr_vec(args, mutbl) => {
17071707
let tt = ast_expr_vstore_to_vstore(fcx, ev, args.len(), vst);
1708+
let mutability;
1709+
match vst {
1710+
ast::expr_vstore_mut_box => mutability = ast::m_mutbl,
1711+
_ => mutability = mutbl
1712+
}
17081713
let t: ty::t = fcx.infcx().next_ty_var();
17091714
for args.each |e| { bot |= check_expr_with(fcx, *e, t); }
1710-
ty::mk_evec(tcx, {ty: t, mutbl: mutbl}, tt)
1715+
ty::mk_evec(tcx, {ty: t, mutbl: mutability}, tt)
17111716
}
17121717
ast::expr_repeat(element, count_expr, mutbl) => {
17131718
let count = ty::eval_repeat_count(tcx, count_expr, expr.span);
@@ -2721,7 +2726,7 @@ fn ast_expr_vstore_to_vstore(fcx: @fn_ctxt, e: @ast::expr, n: uint,
27212726
ty::vstore_fixed(u)
27222727
}
27232728
ast::expr_vstore_uniq => ty::vstore_uniq,
2724-
ast::expr_vstore_box => ty::vstore_box,
2729+
ast::expr_vstore_box | ast::expr_vstore_mut_box => ty::vstore_box,
27252730
ast::expr_vstore_slice => {
27262731
let r = fcx.infcx().next_region_var(e.span, e.id);
27272732
ty::vstore_slice(r)

trunk/src/libstd/std.rs

Lines changed: 0 additions & 7 deletions
This file was deleted.

0 commit comments

Comments
 (0)