rustc: Add legacy_records field to the type context
This commit is contained in:
parent
a72aeef9f7
commit
db6af50d53
|
@ -418,6 +418,7 @@ type ctxt =
|
|||
mut next_id: uint,
|
||||
vecs_implicitly_copyable: bool,
|
||||
legacy_modes: bool,
|
||||
legacy_records: bool,
|
||||
cstore: metadata::cstore::CStore,
|
||||
sess: session::Session,
|
||||
def_map: resolve::DefMap,
|
||||
|
@ -984,11 +985,16 @@ fn mk_ctxt(s: session::Session,
|
|||
+lang_items: middle::lang_items::LanguageItems,
|
||||
crate: @ast::crate) -> ctxt {
|
||||
let mut legacy_modes = false;
|
||||
let mut legacy_records = false;
|
||||
for crate.node.attrs.each |attribute| {
|
||||
match attribute.node.value.node {
|
||||
ast::meta_word(ref w) if (*w) == ~"legacy_modes" => {
|
||||
legacy_modes = true;
|
||||
break;
|
||||
if legacy_records { break; }
|
||||
}
|
||||
ast::meta_word(ref w) if (*w) == ~"legacy_records" => {
|
||||
legacy_records = true;
|
||||
if legacy_modes { break; }
|
||||
}
|
||||
_ => {}
|
||||
}
|
||||
|
@ -1003,6 +1009,7 @@ fn mk_ctxt(s: session::Session,
|
|||
mut next_id: 0u,
|
||||
vecs_implicitly_copyable: vecs_implicitly_copyable,
|
||||
legacy_modes: legacy_modes,
|
||||
legacy_records: legacy_records,
|
||||
cstore: s.cstore,
|
||||
sess: s,
|
||||
def_map: dm,
|
||||
|
|
Loading…
Reference in New Issue