Add the interner to parse_sess.
This commit is contained in:
parent
85ded92736
commit
1e36d216be
9 changed files with 47 additions and 104 deletions
|
|
@ -1018,20 +1018,6 @@ fn decode_item_ast(par_doc: ebml::doc) -> @ast::item {
|
|||
@ast::deserialize_item(d)
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
fn new_parse_sess() -> parse::parse_sess {
|
||||
let cm = codemap::new_codemap();
|
||||
let handler = diagnostic::mk_handler(option::none);
|
||||
let sess = @{
|
||||
cm: cm,
|
||||
mut next_id: 1,
|
||||
span_diagnostic: diagnostic::mk_span_handler(handler, cm),
|
||||
mut chpos: 0u,
|
||||
mut byte_pos: 0u
|
||||
};
|
||||
ret sess;
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
iface fake_ext_ctxt {
|
||||
fn cfg() -> ast::crate_cfg;
|
||||
|
|
@ -1044,7 +1030,7 @@ type fake_session = ();
|
|||
#[cfg(test)]
|
||||
impl of fake_ext_ctxt for fake_session {
|
||||
fn cfg() -> ast::crate_cfg { [] }
|
||||
fn parse_sess() -> parse::parse_sess { new_parse_sess() }
|
||||
fn parse_sess() -> parse::parse_sess { parse::new_parse_sess(none) }
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue