From ae7c9824215dbaa53786cba2fcc1d9537cb06276 Mon Sep 17 00:00:00 2001 From: Matt Hooper Date: Mon, 21 Sep 2020 00:39:17 +0100 Subject: Add make utility for empty associated item lists --- crates/syntax/src/ast/make.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/crates/syntax/src/ast/make.rs b/crates/syntax/src/ast/make.rs index 6868feed9..4a0ffcbb0 100644 --- a/crates/syntax/src/ast/make.rs +++ b/crates/syntax/src/ast/make.rs @@ -21,6 +21,10 @@ pub fn ty(text: &str) -> ast::Type { ast_from_text(&format!("impl {} for D {{}};", text)) } +pub fn assoc_item_list() -> ast::AssocItemList { + ast_from_text("impl C for D {};") +} + pub fn path_segment(name_ref: ast::NameRef) -> ast::PathSegment { ast_from_text(&format!("use {};", name_ref)) } -- cgit v1.2.3