about summary refs log tree commit diff
path: root/src/libsyntax/parse/parser/generics.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2019-11-07 07:55:39 +0000
committerbors <bors@rust-lang.org>2019-11-07 07:55:39 +0000
commit50f8aadd746ebc929a752e5ffb133936ee75c52f (patch)
tree47453a165c08c24ca9b3224506ff74a2f8b053e5 /src/libsyntax/parse/parser/generics.rs
parent7a76fe76f756895b8cda1e10398f2268656a2e0f (diff)
parentc9eae9ea63abe57d8bb91905d5ca4cff8dd8ea56 (diff)
downloadrust-50f8aadd746ebc929a752e5ffb133936ee75c52f.tar.gz
rust-50f8aadd746ebc929a752e5ffb133936ee75c52f.zip
Auto merge of #66180 - Centril:rollup-c1ji943, r=Centril
Rollup of 5 pull requests

Successful merges:

 - #59789 (Revert two unapproved changes to rustc_typeck.)
 - #65752 (Use structured suggestions for missing associated items)
 - #65884 (syntax: ABI-oblivious grammar)
 - #65974 (A scheme for more macro-matcher friendly pre-expansion gating)
 - #66017 (Add future incompatibility lint for `array.into_iter()`)

Failed merges:

 - #66056 (rustc_metadata: Some reorganization of the module structure)

r? @ghost
Diffstat (limited to 'src/libsyntax/parse/parser/generics.rs')
-rw-r--r--src/libsyntax/parse/parser/generics.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/libsyntax/parse/parser/generics.rs b/src/libsyntax/parse/parser/generics.rs
index 51caae69c86..3c094750b4d 100644
--- a/src/libsyntax/parse/parser/generics.rs
+++ b/src/libsyntax/parse/parser/generics.rs
@@ -3,7 +3,8 @@ use super::{Parser, PResult};
 use crate::ast::{self, WhereClause, GenericParam, GenericParamKind, GenericBounds, Attribute};
 use crate::parse::token;
 use crate::source_map::DUMMY_SP;
-use crate::symbol::kw;
+
+use syntax_pos::symbol::{kw, sym};
 
 impl<'a> Parser<'a> {
     /// Parses bounds of a lifetime parameter `BOUND + BOUND + BOUND`, possibly with trailing `+`.
@@ -62,7 +63,7 @@ impl<'a> Parser<'a> {
         self.expect(&token::Colon)?;
         let ty = self.parse_ty()?;
 
-        self.sess.gated_spans.const_generics.borrow_mut().push(lo.to(self.prev_span));
+        self.sess.gated_spans.gate(sym::const_generics, lo.to(self.prev_span));
 
         Ok(GenericParam {
             ident,