Skip to content

Commit 92d66a1

Browse files
committed
parser: document parse_pat.
1 parent b7178ef commit 92d66a1

File tree

1 file changed

+4
-0
lines changed
  • src/libsyntax/parse/parser

1 file changed

+4
-0
lines changed

src/libsyntax/parse/parser/pat.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ type Expected = Option<&'static str>;
1616

1717
impl<'a> Parser<'a> {
1818
/// Parses a pattern.
19+
///
20+
/// Corresponds to `pat<no_top_alt>` in RFC 2535 and does not admit or-patterns
21+
/// at the top level. Used when parsing the parameters of lambda expressions,
22+
/// functions, function pointers, and `pat` macro fragments.
1923
pub fn parse_pat(&mut self, expected: Expected) -> PResult<'a, P<Pat>> {
2024
self.parse_pat_with_range_pat(true, expected)
2125
}

0 commit comments

Comments
 (0)