diff options
| author | Philipp Brüschweiler <blei42@gmail.com> | 2013-06-27 15:04:22 +0200 |
|---|---|---|
| committer | Philipp Brüschweiler <blei42@gmail.com> | 2013-06-27 15:06:19 +0200 |
| commit | 7295a6da92ac4bfcbc714848bd611dae54df0b67 (patch) | |
| tree | 20cb2e86cc5b98024c3d2a9b87fd8ba6289979fb /src/libsyntax/ext | |
| parent | 0bad3e62b48a172389833520fad375fecc3f9be7 (diff) | |
| download | rust-7295a6da92ac4bfcbc714848bd611dae54df0b67.tar.gz rust-7295a6da92ac4bfcbc714848bd611dae54df0b67.zip | |
Remove many shared pointers
Mostly just low-haning fruit, i.e. function arguments that were @ even though & would work just as well. Reduces librustc.so size by 200k when compiling without -O, by 100k when compiling with -O.
Diffstat (limited to 'src/libsyntax/ext')
| -rw-r--r-- | src/libsyntax/ext/deriving/cmp/totaleq.rs | 2 | ||||
| -rw-r--r-- | src/libsyntax/ext/expand.rs | 4 |
2 files changed, 2 insertions, 4 deletions
diff --git a/src/libsyntax/ext/deriving/cmp/totaleq.rs b/src/libsyntax/ext/deriving/cmp/totaleq.rs index ccfb34a3a2f..70ac4d3d4c1 100644 --- a/src/libsyntax/ext/deriving/cmp/totaleq.rs +++ b/src/libsyntax/ext/deriving/cmp/totaleq.rs @@ -8,8 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -use std::prelude::*; - use ast::{meta_item, item, expr}; use codemap::span; use ext::base::ExtCtxt; diff --git a/src/libsyntax/ext/expand.rs b/src/libsyntax/ext/expand.rs index 7fc784320ac..15f915ba4d8 100644 --- a/src/libsyntax/ext/expand.rs +++ b/src/libsyntax/ext/expand.rs @@ -644,7 +644,7 @@ pub fn core_macros() -> @str { } pub fn expand_crate(parse_sess: @mut parse::ParseSess, - cfg: ast::crate_cfg, c: @crate) -> @crate { + cfg: ast::crate_cfg, c: &crate) -> @crate { // adding *another* layer of indirection here so that the block // visitor can swap out one exts table for another for the duration // of the block. The cleaner alternative would be to thread the @@ -695,7 +695,7 @@ pub fn expand_crate(parse_sess: @mut parse::ParseSess, // as it registers all the core macros as expanders. f.fold_item(cm); - @f.fold_crate(&*c) + @f.fold_crate(c) } // given a function from idents to idents, produce |
