pre-expansion gate const_generics
This commit is contained in:
parent
04c661ba02
commit
49cbfa1a6f
9 changed files with 37 additions and 26 deletions
|
|
@ -55,11 +55,15 @@ impl<'a> Parser<'a> {
|
|||
}
|
||||
|
||||
fn parse_const_param(&mut self, preceding_attrs: Vec<Attribute>) -> PResult<'a, GenericParam> {
|
||||
let lo = self.token.span;
|
||||
|
||||
self.expect_keyword(kw::Const)?;
|
||||
let ident = self.parse_ident()?;
|
||||
self.expect(&token::Colon)?;
|
||||
let ty = self.parse_ty()?;
|
||||
|
||||
self.sess.gated_spans.const_generics.borrow_mut().push(lo.to(self.prev_span));
|
||||
|
||||
Ok(GenericParam {
|
||||
ident,
|
||||
id: ast::DUMMY_NODE_ID,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue