mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 12:29:21 +00:00
Add basic support for delegation
This commit is contained in:
parent
1619fa9d8f
commit
0ff89deb69
4 changed files with 161 additions and 0 deletions
|
@ -124,6 +124,10 @@ pub fn assoc_item_list() -> ast::AssocItemList {
|
|||
ast_from_text("impl C for D {}")
|
||||
}
|
||||
|
||||
pub fn impl_(ty: ast::Path) -> ast::Impl {
|
||||
ast_from_text(&format!("impl {} {{}}", ty))
|
||||
}
|
||||
|
||||
pub fn impl_trait(trait_: ast::Path, ty: ast::Path) -> ast::Impl {
|
||||
ast_from_text(&format!("impl {} for {} {{}}", trait_, ty))
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue