diff options
| author | Eduard Burtescu <edy.burt@gmail.com> | 2014-02-14 07:07:09 +0200 | 
|---|---|---|
| committer | Eduard Burtescu <edy.burt@gmail.com> | 2014-02-14 08:43:29 +0200 | 
| commit | a02b10a0621adfe36eb3cc2e46f45fc7ccdb7ea2 (patch) | |
| tree | 86fe8ac57360a232b07c4303547194646129561a /src/librustc/front/std_inject.rs | |
| parent | 22c34f3c4cddea33b916eb92f8d7286b02b865a7 (diff) | |
| download | rust-a02b10a0621adfe36eb3cc2e46f45fc7ccdb7ea2.tar.gz rust-a02b10a0621adfe36eb3cc2e46f45fc7ccdb7ea2.zip | |
Refactored ast_map and friends, mainly to have Paths without storing them.
Diffstat (limited to 'src/librustc/front/std_inject.rs')
| -rw-r--r-- | src/librustc/front/std_inject.rs | 10 | 
1 files changed, 5 insertions, 5 deletions
| diff --git a/src/librustc/front/std_inject.rs b/src/librustc/front/std_inject.rs index 8171e78151e..f4bc1c19063 100644 --- a/src/librustc/front/std_inject.rs +++ b/src/librustc/front/std_inject.rs @@ -73,7 +73,7 @@ pub fn with_version(krate: &str) -> Option<(InternedString, ast::StrStyle)> { impl fold::Folder for StandardLibraryInjector { fn fold_crate(&mut self, krate: ast::Crate) -> ast::Crate { let mut vis = ~[ast::ViewItem { - node: ast::ViewItemExternMod(self.sess.ident_of("std"), + node: ast::ViewItemExternMod(token::str_to_ident("std"), with_version("std"), ast::DUMMY_NODE_ID), attrs: ~[ @@ -90,7 +90,7 @@ impl fold::Folder for StandardLibraryInjector { if use_uv(&krate) && !self.sess.building_library.get() { vis.push(ast::ViewItem { - node: ast::ViewItemExternMod(self.sess.ident_of("green"), + node: ast::ViewItemExternMod(token::str_to_ident("green"), with_version("green"), ast::DUMMY_NODE_ID), attrs: ~[], @@ -98,7 +98,7 @@ impl fold::Folder for StandardLibraryInjector { span: DUMMY_SP }); vis.push(ast::ViewItem { - node: ast::ViewItemExternMod(self.sess.ident_of("rustuv"), + node: ast::ViewItemExternMod(token::str_to_ident("rustuv"), with_version("rustuv"), ast::DUMMY_NODE_ID), attrs: ~[], @@ -163,12 +163,12 @@ impl fold::Folder for PreludeInjector { global: false, segments: ~[ ast::PathSegment { - identifier: self.sess.ident_of("std"), + identifier: token::str_to_ident("std"), lifetimes: opt_vec::Empty, types: opt_vec::Empty, }, ast::PathSegment { - identifier: self.sess.ident_of("prelude"), + identifier: token::str_to_ident("prelude"), lifetimes: opt_vec::Empty, types: opt_vec::Empty, }, | 
