We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d06c9ac commit 8d16309Copy full SHA for 8d16309
crates/formality-check/src/mini_rust_check.rs
@@ -276,13 +276,7 @@ impl Check<'_> {
276
place_ty = ty;
277
}
278
Field(field_projection) => {
279
- let Local(ref local_id) = *field_projection.root else {
280
- bail!("Only Local is allowed as the root of FieldProjection")
281
- };
282
-
283
- let Some(ty) = env.local_variables.get(&local_id) else {
284
- bail!("The local id used in PlaceExpression::Field is invalid.")
285
+ let ty = self.check_place(env, &field_projection.root).unwrap();
286
287
let Some(adt_id) = ty.get_adt_id() else {
288
bail!("The local used for field projection is not adt.")
0 commit comments