File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -780,6 +780,14 @@ never_type : "!" ;
780
780
781
781
** FIXME:** grammar?
782
782
783
+ ### Type parameter bounds
784
+
785
+ ``` antlr
786
+ bound := ty_bound | lt_bound
787
+ lt_bound := lifetime
788
+ ty_bound := [?] [ for<lt_param_defs> ] simple_path
789
+ ```
790
+
783
791
### Self types
784
792
785
793
** FIXME:** grammar?
Original file line number Diff line number Diff line change @@ -4066,7 +4066,7 @@ impl<'a> Parser<'a> {
4066
4066
} ) . emit ( ) ;
4067
4067
}
4068
4068
4069
- // Parse bounds of a type parameter `BOUND + BOUND + BOUND` without trailing `+` .
4069
+ // Parse bounds of a type parameter `BOUND + BOUND + BOUND`.
4070
4070
// BOUND = TY_BOUND | LT_BOUND
4071
4071
// LT_BOUND = LIFETIME (e.g. `'a`)
4072
4072
// TY_BOUND = [?] [for<LT_PARAM_DEFS>] SIMPLE_PATH (e.g. `?for<'a: 'b> m::Trait<'a>`)
@@ -4107,7 +4107,7 @@ impl<'a> Parser<'a> {
4107
4107
self . parse_ty_param_bounds_common ( true )
4108
4108
}
4109
4109
4110
- // Parse bounds of a type parameter `BOUND + BOUND + BOUND` without trailing `+` .
4110
+ // Parse bounds of a type parameter `BOUND + BOUND + BOUND`.
4111
4111
// BOUND = LT_BOUND (e.g. `'a`)
4112
4112
fn parse_lt_param_bounds ( & mut self ) -> Vec < Lifetime > {
4113
4113
let mut lifetimes = Vec :: new ( ) ;
You can’t perform that action at this time.
0 commit comments