We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9df88ff commit 51709c5Copy full SHA for 51709c5
crates/ide-completion/src/render.rs
@@ -634,6 +634,11 @@ fn compute_ref_match(
634
}
635
636
if let Some(expected_without_ref) = &expected_without_ref {
637
+ if completion_ty == &expected_without_ref.add_reference(hir::Mutability::Shared)
638
+ || completion_ty == &expected_without_ref.add_reference(hir::Mutability::Mut)
639
+ {
640
+ return None;
641
+ }
642
if completion_ty.autoderef(ctx.db).any(|ty| ty == *expected_without_ref) {
643
cov_mark::hit!(suggest_ref);
644
let mutability = if expected_type.is_mutable_reference() {
0 commit comments