better documentation for underscore pattern

This commit is contained in:
Kiryl Dziamura 2024-07-05 13:09:11 +02:00
parent e0af069645
commit 64220567e5
No known key found for this signature in database
GPG key ID: FB539501A4561ACF
2 changed files with 5 additions and 1 deletions

View file

@ -1677,6 +1677,10 @@ pub enum Pattern<'a> {
},
FloatLiteral(&'a str),
StrLiteral(StrLiteral<'a>),
/// Underscore pattern
/// Contains the name of underscore pattern (e.g. "a" is for "_a" in code)
/// Empty string is unnamed pattern ("" is for "_" in code)
Underscore(&'a str),
SingleQuote(&'a str),