mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 12:29:21 +00:00
evaluate UnevaluatedConst
in unify
This commit is contained in:
parent
efd3094aba
commit
7ef185d65e
4 changed files with 89 additions and 1 deletions
|
@ -575,6 +575,9 @@ impl<'a> InferenceContext<'a> {
|
|||
let field_ty = field_def.map_or(self.err_ty(), |it| {
|
||||
field_types[it.local_id].clone().substitute(Interner, &substs)
|
||||
});
|
||||
// Field type might have some unknown types
|
||||
// FIXME: we may want to emit a single type variable for all instance of type fields?
|
||||
let field_ty = self.insert_type_vars(field_ty);
|
||||
self.infer_expr_coerce(field.expr, &Expectation::has_type(field_ty));
|
||||
}
|
||||
if let Some(expr) = spread {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue