From 28d1844a259ce02e0d790d6d4e0a8de45b604dd5 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Thu, 3 Apr 2025 08:36:33 +0200 Subject: visit_freeze_sensitive: add comment --- src/tools/miri/src/helpers.rs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/tools') diff --git a/src/tools/miri/src/helpers.rs b/src/tools/miri/src/helpers.rs index 29ed94a2e4a..b4098ca0750 100644 --- a/src/tools/miri/src/helpers.rs +++ b/src/tools/miri/src/helpers.rs @@ -602,6 +602,9 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { // We want to not actually read from memory for this visit. So, before // walking this value, we have to make sure it is not a // `Variants::Multiple`. + // FIXME: the current logic here is layout-dependent, so enums with + // multiple variants where all but 1 are uninhabited will be recursed into. + // Is that truly what we want? match v.layout.variants { Variants::Multiple { .. } => { // A multi-variant enum, or coroutine, or so. -- cgit 1.4.1-3-g733a5