From 0d6fc970a7fd753557d7978fb3f23fcdb08e3c0f Mon Sep 17 00:00:00 2001 From: smarm-agent Date: Fri, 19 Jun 2026 14:48:23 +0000 Subject: [PATCH] scheduler: gate send_after_to runtime tests out of the loom build These three RFC-015 tests call run() (the real runtime), so under --cfg loom they construct loom atomics outside a loom::model block and panic with "cannot access Loom execution state from outside a Loom model". They are unit tests of runtime behavior, not state-machine models. Gate the module #[cfg(all(test, not(loom)))], matching the existing run_queue::tests precedent: they still run under normal cargo test, and the loom build is now 28/28 clean. --- src/scheduler.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/scheduler.rs b/src/scheduler.rs index 861ffc9..f9637e5 100644 --- a/src/scheduler.rs +++ b/src/scheduler.rs @@ -726,7 +726,7 @@ pub fn run(f: F) { crate::runtime::init(crate::runtime::Config::exact(1)).run(f); } -#[cfg(test)] +#[cfg(all(test, not(loom)))] mod send_after_to_tests { use super::*; use crate::channel::channel;