mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 21:05:02 +00:00
Make ReferenceConversion
methods return ast types
This commit is contained in:
parent
039b3d0abb
commit
0519414c19
3 changed files with 14 additions and 10 deletions
|
@ -1033,7 +1033,7 @@ fn fn_arg_type(
|
|||
if ty.is_reference() || ty.is_mutable_reference() {
|
||||
let famous_defs = &FamousDefs(&ctx.sema, ctx.sema.scope(fn_arg.syntax())?.krate());
|
||||
convert_reference_type(ty.strip_references(), ctx.db(), famous_defs)
|
||||
.map(|conversion| conversion.convert_type(ctx.db()))
|
||||
.map(|conversion| conversion.convert_type(ctx.db()).to_string())
|
||||
.or_else(|| ty.display_source_code(ctx.db(), target_module.into(), true).ok())
|
||||
} else {
|
||||
ty.display_source_code(ctx.db(), target_module.into(), true).ok()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue