Add expression fill mode variant for filling with underscore expressions

This commit is contained in:
Lukas Wirth 2025-04-28 10:39:36 +02:00
parent 8fb2dcc947
commit 7e526b6be7
31 changed files with 172 additions and 125 deletions

View file

@ -69,6 +69,9 @@ pub mod ext {
pub fn expr_todo() -> ast::Expr {
expr_from_text("todo!()")
}
pub fn expr_underscore() -> ast::Expr {
expr_from_text("_")
}
pub fn expr_ty_default(ty: &ast::Type) -> ast::Expr {
expr_from_text(&format!("{ty}::default()"))
}