[ ':' bound-list ] [ '->' type ]
lifetime-list := lifetime | lifetime ',' lifetime-list
arg-list := ident ':' type | ident ':' type ',' arg-list
-bound-list := bound | bound '+' bound-list
-bound := path | lifetime
```
### Never type
bound := ty_bound | lt_bound
lt_bound := lifetime
ty_bound := [?] [ for<lt_param_defs> ] simple_path
+bound-list := bound | bound '+' bound-list '+' ?
```
### Self types
}).emit();
}
- // Parse bounds of a type parameter `BOUND + BOUND + BOUND`.
+ // Parse bounds of a lifetime parameter `BOUND + BOUND + BOUND`, possibly with trailing `+`.
// BOUND = TY_BOUND | LT_BOUND
// LT_BOUND = LIFETIME (e.g. `'a`)
// TY_BOUND = [?] [for<LT_PARAM_DEFS>] SIMPLE_PATH (e.g. `?for<'a: 'b> m::Trait<'a>`)
self.parse_ty_param_bounds_common(true)
}
- // Parse bounds of a type parameter `BOUND + BOUND + BOUND`.
+ // Parse bounds of a lifetime parameter `BOUND + BOUND + BOUND`, possibly with trailing `+`.
// BOUND = LT_BOUND (e.g. `'a`)
fn parse_lt_param_bounds(&mut self) -> Vec<Lifetime> {
let mut lifetimes = Vec::new();