From 78a841810eb36e486ba68e6b9fa80e45d805cc4f Mon Sep 17 00:00:00 2001 From: Patrick Walton Date: Tue, 5 Aug 2014 19:44:21 -0700 Subject: librustc: Implement associated types behind a feature gate. The implementation essentially desugars during type collection and AST type conversion time into the parameter scheme we have now. Only fully qualified names--e.g. `::Bar`--are supported. --- src/libsyntax/ext/tt/macro_rules.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/libsyntax/ext') diff --git a/src/libsyntax/ext/tt/macro_rules.rs b/src/libsyntax/ext/tt/macro_rules.rs index 6c7bbb2384c..7a7dbc54c9e 100644 --- a/src/libsyntax/ext/tt/macro_rules.rs +++ b/src/libsyntax/ext/tt/macro_rules.rs @@ -90,7 +90,10 @@ impl<'a> MacResult for ParserAnyMacro<'a> { let mut parser = self.parser.borrow_mut(); match parser.token { EOF => break, - _ => ret.push(parser.parse_method(None)) + _ => { + let attrs = parser.parse_outer_attributes(); + ret.push(parser.parse_method(attrs, ast::Inherited)) + } } } self.ensure_complete_parse(false); -- cgit 1.4.1-3-g733a5