Skip to content

Commit 1f86729

Browse files
authored
Merge pull request #19061 from Veykril/push-rwyqqtqmnput
Disable `Receiver` based autoderef temporarily
2 parents a995319 + 8a9992c commit 1f86729

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

Diff for: crates/hir-ty/src/autoderef.rs

+5-1
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,11 @@ pub(crate) fn deref_by_trait(
194194
}
195195

196196
let trait_id = || {
197-
if use_receiver_trait {
197+
// FIXME: Remove the `false` once `Receiver` needs to be stabilized, doing so will
198+
// effectively bump the MSRV of rust-analyzer to 1.84 due to 1.83 and below lacking the
199+
// blanked impl on `Deref`.
200+
#[expect(clippy::overly_complex_bool_expr)]
201+
if use_receiver_trait && false {
198202
if let Some(receiver) =
199203
db.lang_item(table.trait_env.krate, LangItem::Receiver).and_then(|l| l.as_trait())
200204
{

Diff for: crates/hir-ty/src/tests/method_resolution.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -2163,9 +2163,9 @@ impl Receiver for Bar {
21632163
fn main() {
21642164
let bar = Bar;
21652165
let _v1 = bar.foo1();
2166-
//^^^ type: i32
2166+
//^^^ type: {unknown}
21672167
let _v2 = bar.foo2();
2168-
//^^^ type: bool
2168+
//^^^ type: {unknown}
21692169
}
21702170
"#,
21712171
);

Diff for: crates/ide-completion/src/completions/dot.rs

+1-3
Original file line numberDiff line numberDiff line change
@@ -1500,9 +1500,7 @@ fn main() {
15001500
bar.$0
15011501
}
15021502
"#,
1503-
expect![[r#"
1504-
me foo() fn(self: Bar)
1505-
"#]],
1503+
expect![[r#""#]],
15061504
);
15071505
}
15081506

0 commit comments

Comments
 (0)