feat: Implement arbitrary-self-types

This commit is contained in:
Shoyu Vanilla 2025-01-24 01:53:17 +09:00
parent 84d44d0a57
commit f4dfbc38c8
9 changed files with 129 additions and 26 deletions

View file

@ -1466,4 +1466,34 @@ async fn bar() {
"#,
);
}
#[test]
fn receiver_without_deref_impl_completion() {
check_no_kw(
r#"
//- minicore: receiver
use core::ops::Receiver;
struct Foo;
impl Foo {
fn foo(self: Bar) {}
}
struct Bar;
impl Receiver for Bar {
type Target = Foo;
}
fn main() {
let bar = Bar;
bar.$0
}
"#,
expect![[r#"
me foo() fn(self: Bar)
"#]],
);
}
}