Skip to content

Commit a507370

Browse files
committed
Fix old docs
#41158
1 parent 910c481 commit a507370

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

src/doc/grammar.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -780,6 +780,14 @@ never_type : "!" ;
780780

781781
**FIXME:** grammar?
782782

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+
783791
### Self types
784792

785793
**FIXME:** grammar?

src/libsyntax/parse/parser.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4066,7 +4066,7 @@ impl<'a> Parser<'a> {
40664066
}).emit();
40674067
}
40684068

4069-
// Parse bounds of a type parameter `BOUND + BOUND + BOUND` without trailing `+`.
4069+
// Parse bounds of a type parameter `BOUND + BOUND + BOUND`.
40704070
// BOUND = TY_BOUND | LT_BOUND
40714071
// LT_BOUND = LIFETIME (e.g. `'a`)
40724072
// TY_BOUND = [?] [for<LT_PARAM_DEFS>] SIMPLE_PATH (e.g. `?for<'a: 'b> m::Trait<'a>`)
@@ -4107,7 +4107,7 @@ impl<'a> Parser<'a> {
41074107
self.parse_ty_param_bounds_common(true)
41084108
}
41094109

4110-
// Parse bounds of a type parameter `BOUND + BOUND + BOUND` without trailing `+`.
4110+
// Parse bounds of a type parameter `BOUND + BOUND + BOUND`.
41114111
// BOUND = LT_BOUND (e.g. `'a`)
41124112
fn parse_lt_param_bounds(&mut self) -> Vec<Lifetime> {
41134113
let mut lifetimes = Vec::new();

0 commit comments

Comments
 (0)