Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/syntax/src/ast/make.rs')
| -rw-r--r-- | crates/syntax/src/ast/make.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/crates/syntax/src/ast/make.rs b/crates/syntax/src/ast/make.rs index f16dcd56e9..d428044450 100644 --- a/crates/syntax/src/ast/make.rs +++ b/crates/syntax/src/ast/make.rs @@ -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)) } |