From e4da7c5bee6ca094eeb12a9f47d450e3f962f05c Mon Sep 17 00:00:00 2001 From: Brian Anderson Date: Tue, 2 Aug 2011 22:19:39 -0700 Subject: parse_crate_from_source_str takes a parse_sess, not codemap This was causing problems when reading from stdin for subsequent passes that needed to generate node ids. --- src/comp/syntax/parse/parser.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/comp/syntax/parse') diff --git a/src/comp/syntax/parse/parser.rs b/src/comp/syntax/parse/parser.rs index 473ceb08b51..9e7f693c74b 100644 --- a/src/comp/syntax/parse/parser.rs +++ b/src/comp/syntax/parse/parser.rs @@ -2317,8 +2317,7 @@ fn parse_crate_from_source_file(input: &str, cfg: &ast::crate_cfg, } fn parse_crate_from_source_str(name: &str, source: &str, cfg: &ast::crate_cfg, - cm: &codemap::codemap) -> @ast::crate { - let sess = @{cm: cm, mutable next_id: 0}; + sess: &parse_sess) -> @ast::crate { let ftype = SOURCE_FILE; let filemap = codemap::new_filemap(name, 0u, 0u); sess.cm.files += ~[filemap]; -- cgit 1.4.1-3-g733a5