diff options
| author | bors <bors@rust-lang.org> | 2014-08-14 19:11:18 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2014-08-14 19:11:18 +0000 |
| commit | a8c8e3f80fd0355b2bb91337c6ad0bb0a38d5485 (patch) | |
| tree | 6acf4c541c9321d8a304eb16f486b09755983c52 /src/libsyntax/ext | |
| parent | 404978ea722c0257cc763540c93243e8a21f82ed (diff) | |
| parent | 9907fa4acc2af5b2b07d1362b3ceb29171954c58 (diff) | |
| download | rust-a8c8e3f80fd0355b2bb91337c6ad0bb0a38d5485.tar.gz rust-a8c8e3f80fd0355b2bb91337c6ad0bb0a38d5485.zip | |
auto merge of #16286 : pcwalton/rust/associated-items-groundwork, r=nikomatsakis
methods.
This paves the way to associated items by introducing an extra level of
abstraction ("impl-or-trait item") between traits/implementations and
methods. This new abstraction is encoded in the metadata and used
throughout the compiler where appropriate.
There are no functional changes; this is purely a refactoring.
r? @nick29581
Diffstat (limited to 'src/libsyntax/ext')
| -rw-r--r-- | src/libsyntax/ext/deriving/generic/mod.rs | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/libsyntax/ext/deriving/generic/mod.rs b/src/libsyntax/ext/deriving/generic/mod.rs index 5842ca4a0d5..7a8ee6d1416 100644 --- a/src/libsyntax/ext/deriving/generic/mod.rs +++ b/src/libsyntax/ext/deriving/generic/mod.rs @@ -452,8 +452,13 @@ impl<'a> TraitDef<'a> { self.span, ident, (vec!(attr)).append(self.attributes.as_slice()), - ast::ItemImpl(trait_generics, opt_trait_ref, - self_type, methods)) + ast::ItemImpl(trait_generics, + opt_trait_ref, + self_type, + methods.move_iter() + .map(|method| { + ast::MethodImplItem(method) + }).collect())) } fn expand_struct_def(&self, |
