Auto merge of #41264 - alexeyzab:41158-fix-docs, r=steveklabnik

Fix old docs

Fixes #41158
This commit is contained in:
bors 2017-04-17 15:10:23 +00:00
commit 011f240b89
2 changed files with 11 additions and 4 deletions

View File

@ -761,8 +761,6 @@ closure_type := [ 'unsafe' ] [ '<' lifetime-list '>' ] '|' arg-list '|'
[ ':' bound-list ] [ '->' type ] [ ':' bound-list ] [ '->' type ]
lifetime-list := lifetime | lifetime ',' lifetime-list lifetime-list := lifetime | lifetime ',' lifetime-list
arg-list := ident ':' type | ident ':' type ',' arg-list arg-list := ident ':' type | ident ':' type ',' arg-list
bound-list := bound | bound '+' bound-list
bound := path | lifetime
``` ```
### Never type ### Never type
@ -780,6 +778,15 @@ never_type : "!" ;
**FIXME:** grammar? **FIXME:** grammar?
### Type parameter bounds
```antlr
bound := ty_bound | lt_bound
lt_bound := lifetime
ty_bound := [?] [ for<lt_param_defs> ] simple_path
bound-list := bound | bound '+' bound-list '+' ?
```
### Self types ### Self types
**FIXME:** grammar? **FIXME:** grammar?

View File

@ -4066,7 +4066,7 @@ fn warn_missing_semicolon(&self) {
}).emit(); }).emit();
} }
// Parse bounds of a type parameter `BOUND + BOUND + BOUND` without trailing `+`. // Parse bounds of a type parameter `BOUND + BOUND + BOUND`, possibly with trailing `+`.
// BOUND = TY_BOUND | LT_BOUND // BOUND = TY_BOUND | LT_BOUND
// LT_BOUND = LIFETIME (e.g. `'a`) // LT_BOUND = LIFETIME (e.g. `'a`)
// TY_BOUND = [?] [for<LT_PARAM_DEFS>] SIMPLE_PATH (e.g. `?for<'a: 'b> m::Trait<'a>`) // TY_BOUND = [?] [for<LT_PARAM_DEFS>] SIMPLE_PATH (e.g. `?for<'a: 'b> m::Trait<'a>`)
@ -4107,7 +4107,7 @@ fn parse_ty_param_bounds(&mut self) -> PResult<'a, TyParamBounds> {
self.parse_ty_param_bounds_common(true) self.parse_ty_param_bounds_common(true)
} }
// Parse bounds of a type parameter `BOUND + BOUND + BOUND` without trailing `+`. // Parse bounds of a lifetime parameter `BOUND + BOUND + BOUND`, possibly with trailing `+`.
// BOUND = LT_BOUND (e.g. `'a`) // BOUND = LT_BOUND (e.g. `'a`)
fn parse_lt_param_bounds(&mut self) -> Vec<Lifetime> { fn parse_lt_param_bounds(&mut self) -> Vec<Lifetime> {
let mut lifetimes = Vec::new(); let mut lifetimes = Vec::new();