diff options
| author | Patrick Walton <pcwalton@mimiga.net> | 2012-07-27 19:32:42 -0700 |
|---|---|---|
| committer | Patrick Walton <pcwalton@mimiga.net> | 2012-07-27 19:35:24 -0700 |
| commit | 93c2f5e0e43532a2288ed6dec378564264d1a77c (patch) | |
| tree | 2d8d3f5d4667f7a009fa338bc34076216873b35c /src/libsyntax/ext | |
| parent | e6d2e49852873c52b872185a0ae5a8ca941ed2f1 (diff) | |
| download | rust-93c2f5e0e43532a2288ed6dec378564264d1a77c.tar.gz rust-93c2f5e0e43532a2288ed6dec378564264d1a77c.zip | |
rustc: Use coherence for operator overloading.
The only use of the old-style impls is now placement new.
Diffstat (limited to 'src/libsyntax/ext')
| -rw-r--r-- | src/libsyntax/ext/pipes/ast_builder.rs | 17 | ||||
| -rw-r--r-- | src/libsyntax/ext/pipes/pipec.rs | 2 |
2 files changed, 1 insertions, 18 deletions
diff --git a/src/libsyntax/ext/pipes/ast_builder.rs b/src/libsyntax/ext/pipes/ast_builder.rs index f367fb63985..bb5b35233cd 100644 --- a/src/libsyntax/ext/pipes/ast_builder.rs +++ b/src/libsyntax/ext/pipes/ast_builder.rs @@ -31,23 +31,6 @@ fn empty_span() -> span { {lo: 0, hi: 0, expn_info: none} } -trait path_concat { - fn +(id: ident) -> @ast::path; -} - -impl methods of path_concat for ident { - fn +(id: ident) -> @ast::path { - path(self, empty_span()) + id - } -} - -impl methods of path_concat for @ast::path { - fn +(id: ident) -> @ast::path { - @{idents: vec::append_one(self.idents, id) - with *self} - } -} - trait append_types { fn add_ty(ty: @ast::ty) -> @ast::path; fn add_tys(+tys: ~[@ast::ty]) -> @ast::path; diff --git a/src/libsyntax/ext/pipes/pipec.rs b/src/libsyntax/ext/pipes/pipec.rs index 392e6ba392a..c1274d12f1d 100644 --- a/src/libsyntax/ext/pipes/pipec.rs +++ b/src/libsyntax/ext/pipes/pipec.rs @@ -16,12 +16,12 @@ import ext::base::{mk_ctxt, ext_ctxt}; import parse; import parse::*; import proto::*; +import ast::methods; import ast_builder::append_types; import ast_builder::ast_builder; import ast_builder::methods; import ast_builder::path; -import ast_builder::path_concat; // Transitional reexports so qquote can find the paths it is looking for mod syntax { |
