mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-15 18:15:01 +00:00
auto merge of #6643 : sanxiyn/rust/legacy-modes, r=bstrie
This commit is contained in:
commit
84233c0b4b
@ -239,7 +239,7 @@ pub fn compile_rest(sess: Session,
|
||||
let (llmod, link_meta) = {
|
||||
|
||||
let ty_cx = ty::mk_ctxt(sess, def_map, ast_map, freevars,
|
||||
region_map, rp_set, lang_items, crate);
|
||||
region_map, rp_set, lang_items);
|
||||
|
||||
// passes are timed inside typeck
|
||||
let (method_map, vtable_map) = typeck::check_crate(
|
||||
|
@ -232,7 +232,6 @@ struct ctxt_ {
|
||||
diag: @syntax::diagnostic::span_handler,
|
||||
interner: @mut HashMap<intern_key, ~t_box_>,
|
||||
next_id: @mut uint,
|
||||
legacy_modes: bool,
|
||||
cstore: @mut metadata::cstore::CStore,
|
||||
sess: session::Session,
|
||||
def_map: resolve::DefMap,
|
||||
@ -906,24 +905,12 @@ pub fn mk_ctxt(s: session::Session,
|
||||
freevars: freevars::freevar_map,
|
||||
region_maps: @mut middle::region::RegionMaps,
|
||||
region_paramd_items: middle::region::region_paramd_items,
|
||||
lang_items: middle::lang_items::LanguageItems,
|
||||
crate: @ast::crate)
|
||||
lang_items: middle::lang_items::LanguageItems)
|
||||
-> ctxt {
|
||||
let mut legacy_modes = false;
|
||||
for crate.node.attrs.each |attribute| {
|
||||
match attribute.node.value.node {
|
||||
ast::meta_word(w) if *w == ~"legacy_modes" => {
|
||||
legacy_modes = true;
|
||||
}
|
||||
_ => {}
|
||||
}
|
||||
}
|
||||
|
||||
@ctxt_ {
|
||||
diag: s.diagnostic(),
|
||||
interner: @mut HashMap::new(),
|
||||
next_id: @mut primitives::LAST_PRIMITIVE_ID,
|
||||
legacy_modes: legacy_modes,
|
||||
cstore: s.cstore,
|
||||
sess: s,
|
||||
def_map: dm,
|
||||
|
@ -67,7 +67,7 @@ fn setup_env(test_name: &str, source_string: &str) -> Env {
|
||||
cfg, parse_sess);
|
||||
|
||||
let tcx = ty::mk_ctxt(sess, dm, amap, freevars, region_map,
|
||||
region_paramd_items, lang_items, crate);
|
||||
region_paramd_items, lang_items);
|
||||
|
||||
let infcx = infer::new_infer_ctxt(tcx);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user