Skip to content

Commit 83d1d8b

Browse files
committed
---
yaml --- r: 16024 b: refs/heads/try c: ccd8d55 h: refs/heads/master v: v3
1 parent 0ed5c5c commit 83d1d8b

File tree

17 files changed

+25
-52
lines changed

17 files changed

+25
-52
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
refs/heads/master: 61b1875c16de39c166b0f4d54bba19f9c6777d1a
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 4a81779abd786ff22d71434c6d9a5917ea4cdfff
5-
refs/heads/try: f5c51b0a9c084418ae90b8909dc10b13ff318d72
5+
refs/heads/try: ccd8d5573ea41fbcdd2b8212f7ec28876e15fd32
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105

branches/try/src/libcore/extfmt.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ mod ct {
112112
}
113113
} else { buf += curr; i += 1u; }
114114
}
115-
buf = flush_buf(buf, pieces);
115+
flush_buf(buf, pieces);
116116
ret pieces;
117117
}
118118
fn peek_num(s: str, i: uint, lim: uint) ->

branches/try/src/librustsyntax/parse/lexer.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ fn scan_number(c: char, rdr: reader) -> token::token {
199199
}
200200
num_str = scan_digits(rdr, base);
201201
c = rdr.curr;
202-
n = rdr.next();
202+
rdr.next();
203203
if c == 'u' || c == 'i' {
204204
let signed = c == 'i';
205205
let mut tp = {

branches/try/src/librustsyntax/parse/parser.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ class parser {
9090
self.span = span0;
9191
self.last_span = span0;
9292
self.buffer = dvec::dvec();
93-
self.restriction == UNRESTRICTED;
93+
self.restriction = UNRESTRICTED;
9494
self.reader = rdr;
9595
self.keywords = token::keyword_table();
9696
self.restricted_keywords = token::restricted_keyword_table();
@@ -949,7 +949,7 @@ class parser {
949949
fn parse_dot_or_call_expr_with(e0: pexpr) -> pexpr {
950950
let mut e = e0;
951951
let lo = e.span.lo;
952-
let mut hi = e.span.hi;
952+
let mut hi;
953953
loop {
954954
// expr.f
955955
if eat(self, token::DOT) {
@@ -1025,7 +1025,7 @@ class parser {
10251025

10261026
fn parse_prefix_expr() -> pexpr {
10271027
let lo = self.span.lo;
1028-
let mut hi = self.span.hi;
1028+
let mut hi;
10291029

10301030
let mut ex;
10311031
alt self.token {

branches/try/src/libstd/net_tcp.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -734,15 +734,14 @@ fn listen_for_conn(host_ip: ip::ip_addr, port: uint, backlog: uint,
734734
}
735735
}
736736
};
737-
let mut kill_result: option<tcp_err_data> = none;
738737
alt comm::recv(setup_po) {
739738
some(err_data) {
740739
// we failed to bind/list w/ libuv
741740
result::err(err_data.to_tcp_err())
742741
}
743742
none {
744743
on_establish_cb(kill_ch);
745-
kill_result = comm::recv(kill_po);
744+
let kill_result = comm::recv(kill_po);
746745
uv::hl::interact(hl_loop) {|loop_ptr|
747746
log(debug, #fmt("tcp::listen post-kill recv hl interact %?",
748747
loop_ptr));

branches/try/src/libstd/rope.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -753,7 +753,7 @@ mod node {
753753
execution and should be discarded as meaningless afterwards.
754754
"]
755755
fn tree_from_forest_destructive(forest: [mut @node]) -> @node {
756-
let mut i = 0u;
756+
let mut i;
757757
let mut len = vec::len(forest);
758758
while len > 1u {
759759
i = 0u;
@@ -1020,7 +1020,6 @@ mod node {
10201020
let ita = char_iterator::start(a);
10211021
let itb = char_iterator::start(b);
10221022
let mut result = 0;
1023-
let mut pos = 0u;
10241023
while result == 0 {
10251024
alt((char_iterator::next(ita), char_iterator::next(itb))) {
10261025
(option::none, option::none) {
@@ -1036,7 +1035,6 @@ mod node {
10361035
result = -1;
10371036
}
10381037
}
1039-
pos += 1u;
10401038
}
10411039
ret result;
10421040
}

branches/try/src/rustc/back/link.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -429,15 +429,14 @@ fn symbol_hash(tcx: ty::ctxt, sha: sha1, t: ty::t,
429429
}
430430

431431
fn get_symbol_hash(ccx: @crate_ctxt, t: ty::t) -> str {
432-
let mut hash = "";
433432
alt ccx.type_sha1s.find(t) {
434-
some(h) { hash = h; }
433+
some(h) { ret h; }
435434
none {
436-
hash = symbol_hash(ccx.tcx, ccx.sha, t, ccx.link_meta);
435+
let hash = symbol_hash(ccx.tcx, ccx.sha, t, ccx.link_meta);
437436
ccx.type_sha1s.insert(t, hash);
437+
ret hash;
438438
}
439439
}
440-
ret hash;
441440
}
442441

443442

branches/try/src/rustc/driver/driver.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -587,8 +587,8 @@ fn build_output_filenames(input: input,
587587
ofile: option<str>,
588588
sess: session)
589589
-> output_filenames {
590-
let mut obj_path = "";
591-
let mut out_path: str = "";
590+
let mut obj_path; // FIXME remove mut after snapshot
591+
let mut out_path; // FIXME remove mut after snapshot
592592
let sopts = sess.opts;
593593
let stop_after_codegen =
594594
sopts.output_type != link::output_type_exe ||

branches/try/src/rustc/middle/trans/base.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3855,7 +3855,7 @@ fn trans_break_cont(bcx: block, to_end: bool)
38553855
let _icx = bcx.insn_ctxt("trans_break_cont");
38563856
// Locate closest loop block, outputting cleanup as we go.
38573857
let mut unwind = bcx;
3858-
let mut target = bcx;
3858+
let mut target = bcx; // FIXME---not necc. but tstate thinks it is
38593859
loop {
38603860
alt unwind.kind {
38613861
block_scope({loop_break: some(brk), _}) {

branches/try/src/rustc/middle/tstate/auxiliary.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -472,7 +472,8 @@ fn node_id_to_def(ccx: crate_ctxt, id: node_id) -> option<def> {
472472

473473
fn norm_a_constraint(id: def_id, c: constraint) -> [norm_constraint] {
474474
let mut rslt: [norm_constraint] = [];
475-
for vec::each(*c.descs) {|pd|
475+
let descs = *c.descs;
476+
for vec::each(descs) {|pd|
476477
rslt +=
477478
[{bit_num: pd.node.bit_num,
478479
c: respan(pd.span, {path: c.path,

branches/try/src/rustc/middle/tstate/pre_post_conditions.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ fn join_then_else(fcx: fn_ctxt, antec: @expr, conseq: blk,
167167
}
168168

169169
fn gen_if_local(fcx: fn_ctxt, lhs: @expr, rhs: @expr, larger_id: node_id,
170-
new_var: node_id, pth: @path) {
170+
new_var: node_id) {
171171
alt node_id_to_def(fcx.ccx, new_var) {
172172
some(d) {
173173
alt d {
@@ -206,7 +206,7 @@ fn handle_update(fcx: fn_ctxt, parent: @expr, lhs: @expr, rhs: @expr,
206206
_ { }
207207
}
208208

209-
gen_if_local(fcx, lhs, rhs, parent.id, lhs.id, p);
209+
gen_if_local(fcx, lhs, rhs, parent.id, lhs.id);
210210
alt rhs.node {
211211
expr_path(p1) {
212212
let d = local_node_id_to_local_def_id(fcx, lhs.id);

branches/try/src/rustc/middle/tstate/states.rs

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -197,30 +197,6 @@ fn find_pre_post_state_exprs(fcx: fn_ctxt, pres: prestate, id: node_id,
197197
ret changed;
198198
}
199199

200-
fn find_pre_post_state_loop(fcx: fn_ctxt, pres: prestate, l: @local,
201-
index: @expr, body: blk, id: node_id) -> bool {
202-
// I'm confused about this -- how does the poststate for the body
203-
// ever grow larger? It seems like it can't?
204-
let loop_pres = intersect_states(pres, block_poststate(fcx.ccx, body));
205-
206-
let mut changed =
207-
set_prestate_ann(fcx.ccx, id, loop_pres) |
208-
find_pre_post_state_expr(fcx, pres, index);
209-
210-
let index_post = tritv_clone(expr_poststate(fcx.ccx, index));
211-
changed |= find_pre_post_state_block(fcx, index_post, body);
212-
213-
if has_nonlocal_exits(body) {
214-
// See [Break-unsound]
215-
ret changed | set_poststate_ann(fcx.ccx, id, pres);
216-
} else {
217-
let res_p =
218-
intersect_states(expr_poststate(fcx.ccx, index),
219-
block_poststate(fcx.ccx, body));
220-
ret changed | set_poststate_ann(fcx.ccx, id, res_p);
221-
}
222-
}
223-
224200
fn join_then_else(fcx: fn_ctxt, antec: @expr, conseq: blk,
225201
maybe_alt: option<@expr>, id: node_id, chk: if_ty,
226202
pres: prestate) -> bool {
@@ -664,7 +640,6 @@ fn find_pre_post_state_block(fcx: fn_ctxt, pres0: prestate, b: blk) -> bool {
664640
fn find_pre_post_state_fn(fcx: fn_ctxt,
665641
f_decl: fn_decl,
666642
f_body: blk) -> bool {
667-
let num_constrs = num_constraints(fcx.enclosing);
668643
// All constraints are considered false until proven otherwise.
669644
// This ensures that intersect works correctly.
670645
kill_all_prestate(fcx, f_body.node.id);

branches/try/src/rustc/middle/typeck/check.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1481,7 +1481,7 @@ fn check_expr_with_unifier(fcx: @fn_ctxt,
14811481
}
14821482
some(bexpr) {
14831483
let bexpr_t = fcx.expr_ty(bexpr);
1484-
let mut base_fields: [field] = [];
1484+
let mut base_fields; // FIXME remove mut after snapshot
14851485
alt structure_of(fcx, expr.span, bexpr_t) {
14861486
ty::ty_rec(flds) { base_fields = flds; }
14871487
_ {

branches/try/src/rustc/middle/typeck/check/alt.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ fn check_alt(fcx: @fn_ctxt,
55
discrim: @ast::expr,
66
arms: [ast::arm]) -> bool {
77
let tcx = fcx.ccx.tcx;
8-
let mut bot = false;
8+
let mut bot;
99

1010
let pattern_ty = fcx.infcx.next_ty_var();
1111
bot = check_expr_with(fcx, discrim, pattern_ty);

branches/try/src/test/compile-fail/borrowck-pure-scope-in-call.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ fn test2() {
1818

1919
pure_borrow(x, x = ~5); //! ERROR assigning to mutable local variable prohibited due to outstanding loan
2020
//!^ NOTE loan of mutable local variable granted here
21+
22+
copy x;
2123
}
2224

2325
fn main() {
Binary file not shown.
Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,17 @@
1-
// error-pattern: unsatisfied precondition constraint
21
use std;
32
import std::arc;
43
import comm::*;
54

65
fn main() {
76
let v = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
87
let arc_v = arc::arc(v);
9-
10-
task::spawn() {|move arc_v|
8+
9+
task::spawn() {|move arc_v| //! NOTE move of variable occurred here
1110
let v = *arc::get(&arc_v);
1211
assert v[3] == 4;
1312
};
1413

15-
assert (*arc::get(&arc_v))[2] == 3;
14+
assert (*arc::get(&arc_v))[2] == 3; //! ERROR use of moved variable: `arc_v`
1615
1716
log(info, arc_v);
1817
}

0 commit comments

Comments
 (0)