Make ReferenceConversion methods return ast types

This commit is contained in:
DropDemBits 2023-12-14 19:10:02 -05:00
parent 039b3d0abb
commit 0519414c19
No known key found for this signature in database
GPG key ID: 7FE02A6C1EDFA075
3 changed files with 14 additions and 10 deletions

View file

@ -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()