From a5a11a8ef0ac9d66660d93b0db951eae9497705f Mon Sep 17 00:00:00 2001 From: Ben Gamari Date: Mon, 6 Oct 2014 10:53:05 -0400 Subject: syntax: Parse outer attributes in quote_method! Fixes #17782. --- src/libsyntax/parse/parser.rs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/libsyntax/parse') diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs index 4c877c0b101..e728a0893b3 100644 --- a/src/libsyntax/parse/parser.rs +++ b/src/libsyntax/parse/parser.rs @@ -4371,6 +4371,13 @@ impl<'a> Parser<'a> { (ident, ItemFn(decl, fn_style, abi, generics, body), Some(inner_attrs)) } + /// Parse a method in a trait impl + pub fn parse_method_with_outer_attributes(&mut self) -> P { + let attrs = self.parse_outer_attributes(); + let visa = self.parse_visibility(); + self.parse_method(attrs, visa) + } + /// Parse a method in a trait impl, starting with `attrs` attributes. pub fn parse_method(&mut self, attrs: Vec, -- cgit 1.4.1-3-g733a5