diff --git a/src/lib.rs b/src/lib.rs index c0f102670d..e9fb8ba7cb 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1464,6 +1464,11 @@ pub enum Statement { reject: Block, }, /// Conditionally executes one of multiple blocks, based on the value of the selector. + /// + /// Some backends don't support fallthrough (HLSL due to FXC, WGSL). + /// However, a case clause with multiple selectors (and one body) gets translated as + /// a sequence of [`SwitchCase`]s with all but the last one having no body and marked + /// as fallthrough (which can get translated directly to all backends). Switch { selector: Handle, //int cases: Vec,