mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-26 11:59:49 +00:00
feat: add generate_mut_trait_impl assist
This commit is contained in:
parent
69432287cb
commit
8d8d12120d
4 changed files with 236 additions and 0 deletions
|
@ -852,6 +852,10 @@ pub fn self_param() -> ast::SelfParam {
|
|||
ast_from_text("fn f(&self) { }")
|
||||
}
|
||||
|
||||
pub fn mut_self_param() -> ast::SelfParam {
|
||||
ast_from_text("fn f(&mut self) { }")
|
||||
}
|
||||
|
||||
pub fn ret_type(ty: ast::Type) -> ast::RetType {
|
||||
ast_from_text(&format!("fn f() -> {ty} {{ }}"))
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue