mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 11:20:54 +00:00
Disable Receiver
based autoderef temporarily
This commit is contained in:
parent
a995319633
commit
8a9992cef4
@ -194,7 +194,11 @@ pub(crate) fn deref_by_trait(
|
|||||||
}
|
}
|
||||||
|
|
||||||
let trait_id = || {
|
let trait_id = || {
|
||||||
if use_receiver_trait {
|
// FIXME: Remove the `false` once `Receiver` needs to be stabilized, doing so will
|
||||||
|
// effectively bump the MSRV of rust-analyzer to 1.84 due to 1.83 and below lacking the
|
||||||
|
// blanked impl on `Deref`.
|
||||||
|
#[expect(clippy::overly_complex_bool_expr)]
|
||||||
|
if use_receiver_trait && false {
|
||||||
if let Some(receiver) =
|
if let Some(receiver) =
|
||||||
db.lang_item(table.trait_env.krate, LangItem::Receiver).and_then(|l| l.as_trait())
|
db.lang_item(table.trait_env.krate, LangItem::Receiver).and_then(|l| l.as_trait())
|
||||||
{
|
{
|
||||||
|
@ -2163,9 +2163,9 @@ impl Receiver for Bar {
|
|||||||
fn main() {
|
fn main() {
|
||||||
let bar = Bar;
|
let bar = Bar;
|
||||||
let _v1 = bar.foo1();
|
let _v1 = bar.foo1();
|
||||||
//^^^ type: i32
|
//^^^ type: {unknown}
|
||||||
let _v2 = bar.foo2();
|
let _v2 = bar.foo2();
|
||||||
//^^^ type: bool
|
//^^^ type: {unknown}
|
||||||
}
|
}
|
||||||
"#,
|
"#,
|
||||||
);
|
);
|
||||||
|
@ -1500,9 +1500,7 @@ fn main() {
|
|||||||
bar.$0
|
bar.$0
|
||||||
}
|
}
|
||||||
"#,
|
"#,
|
||||||
expect![[r#"
|
expect![[r#""#]],
|
||||||
me foo() fn(self: Bar)
|
|
||||||
"#]],
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user