mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-24 19:12:55 +00:00
Consider block impls in lookup_impl_assoc_item_for_trait_ref
This commit is contained in:
parent
bb78059be4
commit
92d6670f72
3 changed files with 62 additions and 2 deletions
|
@ -1492,6 +1492,29 @@ impl Twait for Stwuct {
|
|||
fn f() {
|
||||
let s = Stwuct;
|
||||
s.a$0();
|
||||
}
|
||||
"#,
|
||||
);
|
||||
}
|
||||
#[test]
|
||||
fn method_call_inside_block() {
|
||||
check(
|
||||
r#"
|
||||
trait Twait {
|
||||
fn a(&self);
|
||||
}
|
||||
|
||||
fn outer() {
|
||||
struct Stwuct;
|
||||
|
||||
impl Twait for Stwuct {
|
||||
fn a(&self){}
|
||||
//^
|
||||
}
|
||||
fn f() {
|
||||
let s = Stwuct;
|
||||
s.a$0();
|
||||
}
|
||||
}
|
||||
"#,
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue