diff options
| author | Alexander Regueiro <alexreg@me.com> | 2018-10-26 23:13:12 +0100 |
|---|---|---|
| committer | Alexander Regueiro <alexreg@me.com> | 2018-11-03 04:09:34 +0000 |
| commit | 4bdc3d833af1229420fce37b245d5cccd1d7cc3f (patch) | |
| tree | 3efa920f528793a265744570e61ccb50b477db3d /src/libsyntax/parse/parser.rs | |
| parent | a8fcfcef3087e9770fa016c5776ce5bf25558ed7 (diff) | |
| download | rust-4bdc3d833af1229420fce37b245d5cccd1d7cc3f.tar.gz rust-4bdc3d833af1229420fce37b245d5cccd1d7cc3f.zip | |
Extended elaboration for trait aliases to include arbitrary bounds.
Diffstat (limited to 'src/libsyntax/parse/parser.rs')
| -rw-r--r-- | src/libsyntax/parse/parser.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs index 6018744215b..d3416d6923c 100644 --- a/src/libsyntax/parse/parser.rs +++ b/src/libsyntax/parse/parser.rs @@ -1295,7 +1295,7 @@ impl<'a> Parser<'a> { self.check_keyword(keywords::Extern) && self.is_extern_non_path() } - /// parse a TyKind::BareFn type: + /// parse a `TyKind::BareFn` type: fn parse_ty_bare_fn(&mut self, generic_params: Vec<GenericParam>) -> PResult<'a, TyKind> { /* @@ -5779,7 +5779,7 @@ impl<'a> Parser<'a> { ast::ImplItemKind)> { // code copied from parse_macro_use_or_failure... abstraction! if let Some(mac) = self.parse_assoc_macro_invoc("impl", Some(vis), at_end)? { - // Method macro. + // method macro Ok((keywords::Invalid.ident(), vec![], ast::Generics::default(), ast::ImplItemKind::Macro(mac))) } else { @@ -6792,11 +6792,11 @@ impl<'a> Parser<'a> { Ok(self.mk_item(lo.to(prev_span), invalid, ItemKind::ForeignMod(m), visibility, attrs)) } - /// Parse type Foo = Bar; + /// Parse `type Foo = Bar;` /// or - /// existential type Foo: Bar; + /// `existential type Foo: Bar;` /// or - /// return None without modifying the parser state + /// `return None` without modifying the parser state fn eat_type(&mut self) -> Option<PResult<'a, (Ident, AliasKind, ast::Generics)>> { // This parses the grammar: // Ident ["<"...">"] ["where" ...] ("=" | ":") Ty ";" |
