You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Generic enum: matching a variant with two or more payload fields fails MIR validation ('use rvalue does not resolve to a concrete MIR type') #1441
enum G[T]:
V(t: T, k: i64)
E
fn main:
let g: G[i64] = G.V(7, 8)
match g:
G.V(t, k) => print(f"t={t} k={k}")
G.E => print("E")
error: invalid MIR before codegen: use rvalue does not resolve to a concrete MIR type (place local=1 local_ty=449 projs=2 proj0_kind=3)
--> g1.w:8:13
8 | G.V(t, k) => print(f"t={t} k={k}")
A single-field variant (V(t: T)) with the same match works. Expected: t=7 k=8.
Activity
MIR/codegen: a generic enum variant with two or more payloads matches…
MIR validator: a user generic enum's payload is not guessed as its ty…
MIR/codegen: a generic enum variant with two or more payloads matches…
MIR validator: a user generic enum's payload is not guessed as its ty…
MIR/codegen: a generic enum variant with two or more payloads matches…
MIR validator: a user generic enum's payload is not guessed as its ty…
ehartford commentedon Sep 26, 2026
Verified fixed on main 55739d4 (release binary): two-field generic variant match prints t=7 k=8.