Skip to content

Commit 13c8edf

Browse files
committed
rustc: remove usage of root_map from astencode
1 parent 71f054d commit 13c8edf

File tree

3 files changed

+4
-10
lines changed

3 files changed

+4
-10
lines changed

src/librustc/driver/driver.rs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -359,11 +359,10 @@ pub fn phase_3_run_analysis_passes(sess: Session,
359359
time(time_passes, "liveness checking", (), |_|
360360
middle::liveness::check_crate(&ty_cx, &capture_map, krate));
361361

362-
let root_map =
363-
time(time_passes, "borrow checking", (), |_|
364-
middle::borrowck::check_crate(&ty_cx, &moves_map,
365-
&moved_variables_set,
366-
&capture_map, krate));
362+
time(time_passes, "borrow checking", (), |_|
363+
middle::borrowck::check_crate(&ty_cx, &moves_map,
364+
&moved_variables_set,
365+
&capture_map, krate));
367366

368367
drop(moves_map);
369368
drop(moved_variables_set);
@@ -391,7 +390,6 @@ pub fn phase_3_run_analysis_passes(sess: Session,
391390
exported_items: exported_items,
392391
public_items: public_items,
393392
maps: astencode::Maps {
394-
root_map: root_map,
395393
capture_map: RefCell::new(capture_map)
396394
},
397395
reachable: reachable_map

src/librustc/middle/astencode.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ use writer = serialize::ebml::writer;
5454

5555
// Auxiliary maps of things to be encoded
5656
pub struct Maps {
57-
pub root_map: middle::borrowck::root_map,
5857
pub capture_map: RefCell<middle::moves::CaptureMap>,
5958
}
6059

src/librustc/middle/const_eval.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ use syntax::visit;
2424
use syntax::{ast, ast_map, ast_util};
2525

2626
use std::cell::RefCell;
27-
use collections::HashMap;
2827
use std::rc::Rc;
2928

3029
//
@@ -127,7 +126,6 @@ pub fn lookup_variant_by_id(tcx: &ty::ctxt,
127126
None => {}
128127
}
129128
let maps = astencode::Maps {
130-
root_map: HashMap::new(),
131129
capture_map: RefCell::new(NodeMap::new())
132130
};
133131
let e = match csearch::maybe_get_item_ast(tcx, enum_def,
@@ -166,7 +164,6 @@ pub fn lookup_const_by_id(tcx: &ty::ctxt, def_id: ast::DefId)
166164
None => {}
167165
}
168166
let maps = astencode::Maps {
169-
root_map: HashMap::new(),
170167
capture_map: RefCell::new(NodeMap::new())
171168
};
172169
let e = match csearch::maybe_get_item_ast(tcx, def_id,

0 commit comments

Comments
 (0)