mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-08-22 11:24:24 +00:00
Add support for fill match arms of boolean values
- Add support for boolean inside tuple
This commit is contained in:
parent
7ae0bc1bd4
commit
09147c3303
2 changed files with 207 additions and 23 deletions
|
@ -294,6 +294,14 @@ pub fn wildcard_pat() -> ast::WildcardPat {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn literal_pat(lit: &str) -> ast::LiteralPat {
|
||||
return from_text(lit);
|
||||
|
||||
fn from_text(text: &str) -> ast::LiteralPat {
|
||||
ast_from_text(&format!("fn f() {{ match x {{ {} => {{}} }} }}", text))
|
||||
}
|
||||
}
|
||||
|
||||
/// Creates a tuple of patterns from an iterator of patterns.
|
||||
///
|
||||
/// Invariant: `pats` must be length > 0
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue