mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 22:31:43 +00:00
Don't trigger unresolved method/field diagnostics on types containing errors
This commit is contained in:
parent
31c12ec282
commit
d45708fabe
3 changed files with 21 additions and 3 deletions
|
@ -129,6 +129,19 @@ fn foo() {
|
|||
Foo.bar;
|
||||
// ^^^^^^^ 💡 error: no field `bar` on type `Foo`, but a method with a similar name exists
|
||||
}
|
||||
"#,
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn no_diagnostic_on_unknown() {
|
||||
check_diagnostics(
|
||||
r#"
|
||||
fn foo() {
|
||||
x.foo;
|
||||
(&x).foo;
|
||||
(&((x,),),).foo;
|
||||
}
|
||||
"#,
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue