diff options
| author | James Miller <bladeon@gmail.com> | 2013-07-06 12:47:42 +1200 |
|---|---|---|
| committer | James Miller <bladeon@gmail.com> | 2013-07-07 22:51:09 +1200 |
| commit | 97c5a44d3e805652a54a5693bbf2ab6d44db993b (patch) | |
| tree | d80edf6d0f724bcb435200078501f2564bd9f5f9 /src/libsyntax/ext | |
| parent | 62c83bb17be9a47799d702a9470aa7a84012c782 (diff) | |
| download | rust-97c5a44d3e805652a54a5693bbf2ab6d44db993b.tar.gz rust-97c5a44d3e805652a54a5693bbf2ab6d44db993b.zip | |
De-share trait_ref
Also, makes the pretty-printer use & instead of @ as much as possible, which will help with later changes, though in the interim has produced some... interesting constructs.
Diffstat (limited to 'src/libsyntax/ext')
| -rw-r--r-- | src/libsyntax/ext/build.rs | 6 | ||||
| -rw-r--r-- | src/libsyntax/ext/log_syntax.rs | 2 | ||||
| -rw-r--r-- | src/libsyntax/ext/tt/macro_rules.rs | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/src/libsyntax/ext/build.rs b/src/libsyntax/ext/build.rs index 14ecc26a1c2..68b011e4fd7 100644 --- a/src/libsyntax/ext/build.rs +++ b/src/libsyntax/ext/build.rs @@ -68,7 +68,7 @@ pub trait AstBuilder { fn typaram(&self, id: ast::ident, bounds: @OptVec<ast::TyParamBound>) -> ast::TyParam; - fn trait_ref(&self, path: ast::Path) -> @ast::trait_ref; + fn trait_ref(&self, path: ast::Path) -> ast::trait_ref; fn typarambound(&self, path: ast::Path) -> ast::TyParamBound; fn lifetime(&self, span: span, ident: ast::ident) -> ast::Lifetime; @@ -358,8 +358,8 @@ impl AstBuilder for @ExtCtxt { } } - fn trait_ref(&self, path: ast::Path) -> @ast::trait_ref { - @ast::trait_ref { + fn trait_ref(&self, path: ast::Path) -> ast::trait_ref { + ast::trait_ref { path: path, ref_id: self.next_id() } diff --git a/src/libsyntax/ext/log_syntax.rs b/src/libsyntax/ext/log_syntax.rs index 5b789cbc26c..9e6776363a8 100644 --- a/src/libsyntax/ext/log_syntax.rs +++ b/src/libsyntax/ext/log_syntax.rs @@ -26,7 +26,7 @@ pub fn expand_syntax_ext(cx: @ExtCtxt, cx.print_backtrace(); io::stdout().write_line( print::pprust::tt_to_str( - ast::tt_delim(vec::to_owned(tt)), + &ast::tt_delim(vec::to_owned(tt)), get_ident_interner())); //trivial expression diff --git a/src/libsyntax/ext/tt/macro_rules.rs b/src/libsyntax/ext/tt/macro_rules.rs index 80dd0c7247b..6de504c66fd 100644 --- a/src/libsyntax/ext/tt/macro_rules.rs +++ b/src/libsyntax/ext/tt/macro_rules.rs @@ -82,7 +82,7 @@ pub fn add_new_extension(cx: @ExtCtxt, io::println(fmt!("%s! { %s }", cx.str_of(name), print::pprust::tt_to_str( - ast::tt_delim(vec::to_owned(arg)), + &ast::tt_delim(vec::to_owned(arg)), get_ident_interner()))); } |
