From cd4a7bf36e202ae7e97d9a655750f70176a0651e Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Fri, 18 Dec 2020 19:50:00 +0300 Subject: Minor, cleanup API --- crates/syntax/src/ast/make.rs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'crates/syntax/src') diff --git a/crates/syntax/src/ast/make.rs b/crates/syntax/src/ast/make.rs index 16b079c42..ba7e5d2fb 100644 --- a/crates/syntax/src/ast/make.rs +++ b/crates/syntax/src/ast/make.rs @@ -20,6 +20,9 @@ pub fn name_ref(text: &str) -> ast::NameRef { pub fn ty(text: &str) -> ast::Type { ast_from_text(&format!("impl {} for D {{}};", text)) } +pub fn ty_unit() -> ast::Type { + ty("()") +} pub fn assoc_item_list() -> ast::AssocItemList { ast_from_text("impl C for D {};") -- cgit v1.2.3