mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-25 09:27:43 +00:00
internal: Migrate unwrap_return_type assist to use SyntaxEditor
Also changes `make::expr_empty_block()` to return `ast::BlockExpr` instead of `ast::Expr`
This commit is contained in:
parent
651b43e551
commit
a5a79f5957
4 changed files with 75 additions and 57 deletions
|
|
@ -558,8 +558,8 @@ pub fn expr_const_value(text: &str) -> ast::ConstArg {
|
|||
ast_from_text(&format!("trait Foo<const N: usize = {text}> {{}}"))
|
||||
}
|
||||
|
||||
pub fn expr_empty_block() -> ast::Expr {
|
||||
expr_from_text("{}")
|
||||
pub fn expr_empty_block() -> ast::BlockExpr {
|
||||
ast_from_text("const C: () = {};")
|
||||
}
|
||||
pub fn expr_path(path: ast::Path) -> ast::Expr {
|
||||
expr_from_text(&path.to_string())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue