We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent da06b7c commit 7348844Copy full SHA for 7348844
src/tools/rust-analyzer/crates/ide-completion/src/render.rs
@@ -628,11 +628,9 @@ fn compute_ref_match(
628
let expected_type = ctx.expected_type.as_ref()?;
629
let expected_without_ref = expected_type.remove_ref();
630
let completion_without_ref = completion_ty.remove_ref();
631
-
632
- if completion_ty == expected_type {
+ if expected_type.could_unify_with(ctx.db, completion_ty) {
633
return None;
634
}
635
636
if let Some(expected_without_ref) = &expected_without_ref {
637
if completion_ty.autoderef(ctx.db).any(|ty| ty == *expected_without_ref) {
638
cov_mark::hit!(suggest_ref);
0 commit comments