about summary refs log tree commit diff
path: root/compiler/rustc_const_eval/src/util
diff options
context:
space:
mode:
authorRalf Jung <post@ralfj.de>2024-12-01 17:33:01 +0100
committerRalf Jung <post@ralfj.de>2024-12-18 11:01:54 +0100
commite023590de407f417e0f3da675a372eca7acf60c6 (patch)
tree1250b36437667439bc369777a202d9571cec2f19 /compiler/rustc_const_eval/src/util
parent21de42bf8ddd0f39c766c7705990152302ae1f3b (diff)
make no-variant types a dedicated Variants variant
Diffstat (limited to 'compiler/rustc_const_eval/src/util')
-rw-r--r--compiler/rustc_const_eval/src/util/check_validity_requirement.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/compiler/rustc_const_eval/src/util/check_validity_requirement.rs b/compiler/rustc_const_eval/src/util/check_validity_requirement.rs
index 651a797e97c..a729d9325c8 100644
--- a/compiler/rustc_const_eval/src/util/check_validity_requirement.rs
+++ b/compiler/rustc_const_eval/src/util/check_validity_requirement.rs
@@ -155,6 +155,7 @@ fn check_validity_requirement_lax<'tcx>(
     }
 
     match &this.variants {
+        Variants::Empty => return Ok(false),
         Variants::Single { .. } => {
             // All fields of this single variant have already been checked above, there is nothing
             // else to do.