Merge #6931
6931: Minor, cleanup API r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
This commit is contained in:
commit
150ea3a61f
2 changed files with 4 additions and 1 deletions
|
@ -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…
Add table
Reference in a new issue