Skip to content

Commit f771904

Browse files
committed
---
yaml --- r: 88970 b: refs/heads/snap-stage3 c: ef32b12 h: refs/heads/master v: v3
1 parent 30fae1e commit f771904

File tree

4 files changed

+2
-20
lines changed

4 files changed

+2
-20
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: deeca5d586bfaa4aa60246f671a8d611d38f6248
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: 2de1e3649acc3d0ba3973768124b55d528efbe4f
4+
refs/heads/snap-stage3: ef32b129fa4a64b44c4a0c7ace932ae1724c9c62
55
refs/heads/try: b160761e35efcd1207112b3b782c06633cf441a8
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b

branches/snap-stage3/src/librustc/middle/borrowck/gather_loans/mod.rs

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ impl<'a> visit::Visitor<()> for GatherLoanCtxt<'a> {
8585
gather_loans_in_fn(self, fk, fd, b, s, n);
8686
}
8787
fn visit_stmt(&mut self, s:@Stmt, _:()) {
88-
add_stmt_to_map(self, s);
88+
visit::walk_stmt(self, s, ());
8989
}
9090
fn visit_pat(&mut self, p:&Pat, _:()) {
9191
add_pat_to_id_range(self, p);
@@ -824,15 +824,3 @@ impl<'a> GatherLoanCtxt<'a> {
824824
}
825825
}
826826

827-
// Setting up info that preserve needs.
828-
// This is just the most convenient place to do it.
829-
fn add_stmt_to_map(this: &mut GatherLoanCtxt,
830-
stmt: @ast::Stmt) {
831-
match stmt.node {
832-
ast::StmtExpr(_, id) | ast::StmtSemi(_, id) => {
833-
this.bccx.stmt_map.insert(id);
834-
}
835-
_ => ()
836-
}
837-
visit::walk_stmt(this, stmt, ());
838-
}

branches/snap-stage3/src/librustc/middle/borrowck/mod.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ use middle::typeck;
1717
use middle::moves;
1818
use middle::dataflow::DataFlowContext;
1919
use middle::dataflow::DataFlowOperator;
20-
use util::common::stmt_set;
2120
use util::ppaux::{note_and_explain_region, Repr, UserString};
2221

2322
use std::cell::RefCell;
@@ -85,7 +84,6 @@ pub fn check_crate(
8584
root_map: root_map(),
8685
loan_map: @mut HashMap::new(),
8786
write_guard_map: @mut HashSet::new(),
88-
stmt_map: @mut HashSet::new(),
8987
stats: @mut BorrowStats {
9088
loaned_paths_same: 0,
9189
loaned_paths_imm: 0,
@@ -177,7 +175,6 @@ pub struct BorrowckCtxt {
177175
root_map: root_map,
178176
loan_map: LoanMap,
179177
write_guard_map: write_guard_map,
180-
stmt_map: stmt_set,
181178

182179
// Statistics:
183180
stats: @mut BorrowStats

branches/snap-stage3/src/librustc/util/common.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ use syntax::codemap::{Span};
1414
use syntax::visit;
1515
use syntax::visit::Visitor;
1616

17-
use std::hashmap::HashSet;
1817
use std::local_data;
1918
use extra;
2019

@@ -132,5 +131,3 @@ pub fn pluralize(n: uint, s: ~str) -> ~str {
132131
else { format!("{}s", s) }
133132
}
134133

135-
// A set of node IDs (used to keep track of which node IDs are for statements)
136-
pub type stmt_set = @mut HashSet<ast::NodeId>;

0 commit comments

Comments
 (0)