Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion crates/assists/src/handlers/generate_function.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
3 changes: 3 additions & 0 deletions crates/syntax/src/ast/make.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {};")
Expand Down