Minor, cleanup API

This commit is contained in:
Aleksey Kladov 2020-12-18 19:50:00 +03:00
parent 8be3f25b0b
commit cd4a7bf36e
2 changed files with 4 additions and 1 deletions

View file

@ -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 {};")