about summary refs log tree commit diff
path: root/src/libsyntax/ext/expand.rs
diff options
context:
space:
mode:
authorFlavio Percoco <flaper87@gmail.com>2014-12-28 23:33:18 +0100
committerFlavio Percoco <flaper87@gmail.com>2015-01-04 23:16:13 +0100
commit8b883ab2681e34ef94575f45c6c0e6c2bca23ab7 (patch)
tree899739abf4baa17ccbc570add56eca1987d030f9 /src/libsyntax/ext/expand.rs
parent470118f3e915cdc8f936aca0640b28a7a3d8dc6c (diff)
downloadrust-8b883ab2681e34ef94575f45c6c0e6c2bca23ab7.tar.gz
rust-8b883ab2681e34ef94575f45c6c0e6c2bca23ab7.zip
Add syntax for negative implementations of traits
This commit introduces the syntax for negative implmenetations of traits
as shown below:

`impl !Trait for Type {}`

cc #13231
Part of RFC #3
Diffstat (limited to 'src/libsyntax/ext/expand.rs')
-rw-r--r--src/libsyntax/ext/expand.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libsyntax/ext/expand.rs b/src/libsyntax/ext/expand.rs
index e65ecc19ea1..b3f30dd4581 100644
--- a/src/libsyntax/ext/expand.rs
+++ b/src/libsyntax/ext/expand.rs
@@ -1111,7 +1111,7 @@ impl<'a, 'b> Folder for MacroExpander<'a, 'b> {
 
     fn fold_item(&mut self, item: P<ast::Item>) -> SmallVector<P<ast::Item>> {
         let prev_type = self.current_impl_type.clone();
-        if let ast::Item_::ItemImpl(_, _, _, ref ty, _) = item.node {
+        if let ast::Item_::ItemImpl(_, _, _, _, ref ty, _) = item.node {
             self.current_impl_type = Some(ty.clone());
         }