mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-24 01:02:12 +00:00
Migrate some leftovers in add_missing_match_arms
This commit is contained in:
parent
e2c281aaae
commit
f06f1b81bb
3 changed files with 196 additions and 25 deletions
|
|
@ -784,7 +784,7 @@ pub fn record_pat_field_shorthand(name_ref: ast::NameRef) -> ast::RecordPatField
|
|||
ast_from_text(&format!("fn f(S {{ {name_ref} }}: ()))"))
|
||||
}
|
||||
|
||||
/// Returns a `BindPat` if the path has just one segment, a `PathPat` otherwise.
|
||||
/// Returns a `IdentPat` if the path has just one segment, a `PathPat` otherwise.
|
||||
pub fn path_pat(path: ast::Path) -> ast::Pat {
|
||||
return from_text(&path.to_string());
|
||||
fn from_text(text: &str) -> ast::Pat {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue