Migrate some leftovers in add_missing_match_arms

This commit is contained in:
Shoyu Vanilla 2025-02-17 23:36:44 +09:00
parent e2c281aaae
commit f06f1b81bb
3 changed files with 196 additions and 25 deletions

View file

@ -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 {