{"record":{"id":"24a9c01241be893c","repo":"iced-rs/iced","slug":"not-implemented","errorCode":null,"errorMessage":"not implemented","messagePattern":"not implemented","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"critical","filePath":"futures/src/backend/null.rs","lineNumber":17,"sourceCode":"//! A backend that does nothing!\nuse crate::MaybeSend;\n\n/// An executor that drops all the futures, instead of spawning them.\n#[derive(Debug)]\npub struct Executor;\n\nimpl crate::Executor for Executor {\n    fn new() -> Result<Self, futures::io::Error> {\n        Ok(Self)\n    }\n\n    fn spawn(&self, _future: impl Future<Output = ()> + MaybeSend + 'static) {}\n\n    #[cfg(not(target_arch = \"wasm32\"))]\n    fn block_on<T>(&self, _future: impl Future<Output = T>) -> T {\n        unimplemented!()\n    }\n}\n\npub mod time {\n    //! Listen and react to time.\n}\n","sourceCodeStart":1,"sourceCodeEnd":24,"githubUrl":"https://github.com/iced-rs/iced/blob/2cffa99b395d84fe469b44dccb56bbacd2f1a157/futures/src/backend/null.rs#L1-L24","documentation":"iced_futures ships pluggable async executor backends (tokio, smol, thread-pool) behind Cargo features. When none is enabled, `backend::Executor` resolves to the null backend: `spawn` silently drops futures and `block_on` is a stub that panics with `unimplemented!()`. The panic fires the first time anything tries to drive a future to completion on that executor.","triggerScenarios":"Calling `Executor::block_on` (directly, or via an iced entry point that runs the event loop to completion) when iced_futures is compiled with `default-features = false` and no `tokio`/`smol`/`thread-pool` feature. Note that on the null backend `spawn` is also a silent no-op, so futures never running is the earlier symptom.","commonSituations":"Setting default-features = false to slim down iced and forgetting to re-enable an executor; version upgrades that renamed or re-gated executor features; a workspace where another crate's dependency on iced_futures strips optional features via unification; native code accidentally calling the cfg(not(wasm32)) block_on path.","solutions":["Enable an executor backend feature on iced_futures: `iced_futures = { features = [\"tokio\"] }` (or \"smol\" / \"thread-pool\")","If you use the iced facade crate, enable its \"tokio\" (or \"smol\") feature instead of re-declaring iced_futures with default-features = false","Verify the dependency graph keeps an executor enabled: `cargo tree -i iced_futures -f \"{p} {f}\"`","If you must stay executor-free, drive futures with your own runtime and never call block_on on the null Executor"],"exampleFix":"// before\niced_futures = { version = \"0.13\", default-features = false }\n// after\niced_futures = { version = \"0.13\", default-features = false, features = [\"tokio\"] }","handlingStrategy":"fallback","validationCode":"# CI sanity check: confirm an executor feature survives the dependency graph\ncargo tree -i iced_futures -f '{p} {f}' | grep -E 'tokio|smol|thread-pool' || echo 'NO EXECUTOR FEATURE ENABLED'","typeGuard":null,"tryCatchPattern":"let outcome = std::panic::catch_unwind(|| executor.block_on(app_future));\nif outcome.is_err() {\n    eprintln!(\"block_on panicked: is an iced_futures executor feature (tokio/smol/thread-pool) enabled?\");\n    std::process::exit(101);\n}","preventionTips":["Always declare an executor feature explicitly when using iced_futures with default-features = false","Prefer the iced facade crate's default tokio backend rather than hand-rolling the dependency","Add a CI check that the built feature set keeps tokio/smol/thread-pool on for iced_futures","Treat futures silently not running as the early symptom of the null backend — investigate before block_on panics"],"tags":["rust","iced","async","executor","feature-flag","panic","unimplemented"],"backgroundTag":"missing-backend-feature","analyzedSha":"2cffa99b395d84fe469b44dccb56bbacd2f1a157","analyzedAt":"2026-08-16T19:41:49.083Z","schemaVersion":2},"datasetVersion":"2026-08-16T23:17:17.608Z"}