When gathering locals, we introduce a `Sized` obligation for each
binding in the pattern. *After* doing so, we typecheck the init
expression. If this has a type failure, we store `{type error}`, for
both the expression and the pattern. But later we store an inference
variable for the pattern.
We now avoid any override of an existing type on a hir node when they've
already been marked as `{type error}`, and on E0277, when it comes from
`VariableType` we silence the error in support of the type error.
Fix #117846.
|
||
|---|---|---|
| .. | ||
| coinductive-1-gat.rs | ||
| coinductive-1.rs | ||
| coinductive-2.rs | ||
| coinductive-2.stderr | ||
| expr-type-error-plus-sized-obligation.rs | ||
| expr-type-error-plus-sized-obligation.stderr | ||
| recursive-type-binding.rs | ||
| recursive-type-binding.stderr | ||
| recursive-type-coercion-from-never.rs | ||
| recursive-type-coercion-from-never.stderr | ||
| recursive-type-pass.rs | ||
| unsized-binding.rs | ||
| unsized-binding.stderr | ||