mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 12:29:21 +00:00
feat(diagnostics): use Default::default() expression instead of todo! when missing fields
Signed-off-by: Benjamin Coenen <5719034+bnjjj@users.noreply.github.com>
This commit is contained in:
parent
3d63abf1d8
commit
0435463439
2 changed files with 20 additions and 4 deletions
|
@ -59,6 +59,9 @@ pub mod ext {
|
|||
pub fn expr_todo() -> ast::Expr {
|
||||
expr_from_text("todo!()")
|
||||
}
|
||||
pub fn expr_default() -> ast::Expr {
|
||||
expr_from_text("Default::default()")
|
||||
}
|
||||
pub fn empty_block_expr() -> ast::BlockExpr {
|
||||
block_expr(None, None)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue