mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-24 11:02:59 +00:00
Fallback to method resolution on unresolved field access with matching method name
This commit is contained in:
parent
9c3de09f6d
commit
35fbc0210c
5 changed files with 140 additions and 72 deletions
|
@ -6698,3 +6698,30 @@ foo!(r"{$0aaaaa}");
|
|||
"#]],
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn method_call_without_parens() {
|
||||
check(
|
||||
r#"
|
||||
struct S;
|
||||
impl S {
|
||||
fn foo<T>(&self, t: T) {}
|
||||
}
|
||||
|
||||
fn main() {
|
||||
S.foo$0;
|
||||
}
|
||||
"#,
|
||||
expect![[r#"
|
||||
*foo*
|
||||
|
||||
```rust
|
||||
test::S
|
||||
```
|
||||
|
||||
```rust
|
||||
fn foo<T>(&self, t: T)
|
||||
```
|
||||
"#]],
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue