Add basic support for delegation
This commit is contained in:
@@ -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))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user