Minor, cleanup API
This commit is contained in:
parent
8be3f25b0b
commit
cd4a7bf36e
|
@ -145,7 +145,7 @@ impl FunctionBuilder {
|
|||
self.type_params,
|
||||
self.params,
|
||||
fn_body,
|
||||
Some(make::ret_type(make::ty("()"))),
|
||||
Some(make::ret_type(make::ty_unit())),
|
||||
);
|
||||
let leading_ws;
|
||||
let trailing_ws;
|
||||
|
|
|
@ -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 {};")
|
||||
|
|
Loading…
Reference in a new issue