diff options
| author | Seo Sanghyeon <sanxiyn@gmail.com> | 2014-02-06 02:16:44 +0900 |
|---|---|---|
| committer | Seo Sanghyeon <sanxiyn@gmail.com> | 2014-02-06 02:26:00 +0900 |
| commit | b653fa0c4a990a7af7413f21a79568a30b597667 (patch) | |
| tree | 91d69df1ecbc71102b8c09c9f7855cff55dc08a1 /src/libsyntax/parse | |
| parent | ed885e35fe91c12892bbf1254b4bc6259cc96eee (diff) | |
Avoid cloning ast::CrateConfig
Diffstat (limited to 'src/libsyntax/parse')
| -rw-r--r-- | src/libsyntax/parse/mod.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libsyntax/parse/mod.rs b/src/libsyntax/parse/mod.rs index 328f0e7f221..abadcee26a7 100644 --- a/src/libsyntax/parse/mod.rs +++ b/src/libsyntax/parse/mod.rs @@ -74,7 +74,7 @@ pub fn parse_crate_from_file( cfg: ast::CrateConfig, sess: @ParseSess ) -> ast::Crate { - new_parser_from_file(sess, /*bad*/ cfg.clone(), input).parse_crate_mod() + new_parser_from_file(sess, cfg, input).parse_crate_mod() // why is there no p.abort_if_errors here? } @@ -94,7 +94,7 @@ pub fn parse_crate_from_source_str(name: ~str, sess: @ParseSess) -> ast::Crate { let mut p = new_parser_from_source_str(sess, - /*bad*/ cfg.clone(), + cfg, name, source); maybe_aborted(p.parse_crate_mod(),p) @@ -106,7 +106,7 @@ pub fn parse_crate_attrs_from_source_str(name: ~str, sess: @ParseSess) -> ~[ast::Attribute] { let mut p = new_parser_from_source_str(sess, - /*bad*/ cfg.clone(), + cfg, name, source); let (inner, _) = maybe_aborted(p.parse_inner_attrs_and_next(),p); |
