about summary refs log tree commit diff
path: root/src/libsyntax/parse/parser.rs
diff options
context:
space:
mode:
authorHuon Wilson <dbau.pp+github@gmail.com>2014-06-13 09:40:10 +1000
committerAlex Crichton <alex@alexcrichton.com>2014-06-13 13:53:55 -0700
commitf907d9772c55d942fb178622b0b2b5a8ca103c11 (patch)
tree04b61cb264604b465dc9a80c3246734e665942fb /src/libsyntax/parse/parser.rs
parent9d5ec04d184a5d28e75d74b725ebb7cc21b547af (diff)
downloadrust-f907d9772c55d942fb178622b0b2b5a8ca103c11.tar.gz
rust-f907d9772c55d942fb178622b0b2b5a8ca103c11.zip
syntax: parse outer attributes in `quote_item!` calls.
Fixes #14857.
Diffstat (limited to 'src/libsyntax/parse/parser.rs')
-rw-r--r--src/libsyntax/parse/parser.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs
index e1a45e5643d..d11d303059f 100644
--- a/src/libsyntax/parse/parser.rs
+++ b/src/libsyntax/parse/parser.rs
@@ -4965,6 +4965,11 @@ impl<'a> Parser<'a> {
         return IoviNone(attrs);
     }
 
+    pub fn parse_item_with_outer_attributes(&mut self) -> Option<Gc<Item>> {
+        let attrs = self.parse_outer_attributes();
+        self.parse_item(attrs)
+    }
+
     pub fn parse_item(&mut self, attrs: Vec<Attribute> ) -> Option<Gc<Item>> {
         match self.parse_item_or_view_item(attrs, true) {
             IoviNone(_) => None,