Error for empty symbol variant values

This commit is contained in:
T0mstone 2025-07-23 13:16:41 +02:00
parent e48fe5e301
commit 91189f4061

View File

@ -271,6 +271,14 @@ impl Symbol {
} }
} }
if v.1.is_empty() {
if v.0.is_empty() {
bail!(span, "default variant is empty");
} else {
bail!(span, "variant is empty: {}", v.0.repr());
}
}
seen.insert(hash, i); seen.insert(hash, i);
} }