Add hir::Function::async_ret_type method
Adjust completion detail for `async fn` return types
This commit is contained in:
parent
f972adc201
commit
9d787e1bfe
3 changed files with 21 additions and 3 deletions
|
|
@ -228,7 +228,7 @@ fn should_add_parens(ctx: &CompletionContext) -> bool {
|
|||
}
|
||||
|
||||
fn detail(db: &dyn HirDatabase, func: hir::Function) -> String {
|
||||
let ret_ty = func.ret_type(db);
|
||||
let ret_ty = func.async_ret_type(db).unwrap_or_else(|| func.ret_type(db));
|
||||
let mut detail = String::new();
|
||||
|
||||
if func.is_const(db) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue