about summary refs log tree commit diff
path: root/src/libsyntax/parse/mod.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2019-06-12 07:38:01 +0000
committerbors <bors@rust-lang.org>2019-06-12 07:38:01 +0000
commit3f511ade5b0bc42028e42b81392feec770d90ead (patch)
treecb5c0d96ce58721918115a689274280c0de8e722 /src/libsyntax/parse/mod.rs
parentc4797fa4f4a696b183b3aa1517ee22c78d0f5d7a (diff)
parent1eaaf440d5173f090d6e937f4b4cffec6c038984 (diff)
downloadrust-3f511ade5b0bc42028e42b81392feec770d90ead.tar.gz
rust-3f511ade5b0bc42028e42b81392feec770d90ead.zip
Auto merge of #60669 - c410-f3r:attrs-fn, r=petrochenkov
Allow attributes in formal function parameters

Implements https://github.com/rust-lang/rust/issues/60406.

This is my first contribution to the compiler and since this is a large and complex project, I am not fully aware of the consequences of the changes I have made.

**TODO**

- [x] Forbid some built-in attributes.
- [x] Expand cfg/cfg_attr
Diffstat (limited to 'src/libsyntax/parse/mod.rs')
-rw-r--r--src/libsyntax/parse/mod.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/libsyntax/parse/mod.rs b/src/libsyntax/parse/mod.rs
index dd96c63ab0e..ba5d1d009d1 100644
--- a/src/libsyntax/parse/mod.rs
+++ b/src/libsyntax/parse/mod.rs
@@ -54,6 +54,7 @@ pub struct ParseSess {
     /// operation token that followed it, but that the parser cannot identify without further
     /// analysis.
     pub ambiguous_block_expr_parse: Lock<FxHashMap<Span, Span>>,
+    pub param_attr_spans: Lock<Vec<Span>>
 }
 
 impl ParseSess {
@@ -79,6 +80,7 @@ impl ParseSess {
             buffered_lints: Lock::new(vec![]),
             edition: Edition::from_session(),
             ambiguous_block_expr_parse: Lock::new(FxHashMap::default()),
+            param_attr_spans: Lock::new(Vec::new()),
         }
     }