mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-03 15:15:24 +00:00
Auto merge of #14271 - Veykril:ty-diag-err, r=Veykril
Don't trigger unresolved method/field diagnostics on types containing errors
This commit is contained in:
commit
ecc32c2f85
3 changed files with 21 additions and 3 deletions
|
@ -567,7 +567,7 @@ impl<'a> InferenceContext<'a> {
|
|||
{
|
||||
*ty = table.resolve_completely(ty.clone());
|
||||
// FIXME: Remove this when we are on par with rustc in terms of inference
|
||||
if ty.is_unknown() {
|
||||
if ty.contains_unknown() {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -576,7 +576,7 @@ impl<'a> InferenceContext<'a> {
|
|||
{
|
||||
let clear = if let Some(ty) = field_with_same_name {
|
||||
*ty = table.resolve_completely(ty.clone());
|
||||
ty.is_unknown()
|
||||
ty.contains_unknown()
|
||||
} else {
|
||||
false
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue