{"record":{"id":"a7ae3c19b2d92254","repo":"tokio-rs/tokio","slug":"start-paused-set-multiple-times","errorCode":null,"errorMessage":"`start_paused` set multiple times.","messagePattern":"`start_paused` set multiple times\\.","errorType":"validation","errorClass":"syn::Error","httpStatus":null,"severity":"error","filePath":"tokio-macros/src/entry.rs","lineNumber":148,"sourceCode":"    ) -> Result<(), syn::Error> {\n        if self.worker_threads.is_some() {\n            return Err(syn::Error::new(\n                span,\n                \"`worker_threads` set multiple times.\",\n            ));\n        }\n\n        let worker_threads = parse_int(worker_threads, span, \"worker_threads\")?;\n        if worker_threads == 0 {\n            return Err(syn::Error::new(span, \"`worker_threads` may not be 0.\"));\n        }\n        self.worker_threads = Some((worker_threads, span));\n        Ok(())\n    }\n\n    fn set_start_paused(&mut self, start_paused: syn::Lit, span: Span) -> Result<(), syn::Error> {\n        if self.start_paused.is_some() {\n            return Err(syn::Error::new(span, \"`start_paused` set multiple times.\"));\n        }\n\n        let start_paused = parse_bool(start_paused, span, \"start_paused\")?;\n        self.start_paused = Some((start_paused, span));\n        Ok(())\n    }\n\n    fn set_crate_name(&mut self, name: syn::Lit, span: Span) -> Result<(), syn::Error> {\n        if self.crate_name.is_some() {\n            return Err(syn::Error::new(span, \"`crate` set multiple times.\"));\n        }\n        let name_path = parse_path(name, span, \"crate\")?;\n        self.crate_name = Some(name_path);\n        Ok(())\n    }\n\n    fn set_unhandled_panic(\n        &mut self,","sourceCodeStart":130,"sourceCodeEnd":166,"githubUrl":"https://github.com/tokio-rs/tokio/blob/625954f365727668cb02d04172b34f1149637728/tokio-macros/src/entry.rs#L130-L166","documentation":"`set_start_paused` (entry.rs:146) records the first `start_paused = bool` and rejects a second one. `start_paused` controls whether tokio's test clock starts paused and is only valid for the `current_thread` flavor.","triggerScenarios":"Writing `#[tokio::test(start_paused = true, start_paused = false)]`.","commonSituations":"Copy-paste; combining two test setups.","solutions":["Remove the duplicate `start_paused`, keeping the single intended boolean."],"exampleFix":"// before\n#[tokio::test(start_paused = true, start_paused = false)]\nasync fn t() {}\n\n// after\n#[tokio::test(start_paused = true)]\nasync fn t() {}","handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":["Set `start_paused` at most once and only with `flavor = \"current_thread\"`.","Use it in `#[tokio::test]` for deterministic time control.","Keep test attribute options in one place to avoid duplicates."],"tags":["tokio","macros","compile-error","config","duplicate-option","testing"],"backgroundTag":null,"analyzedSha":"625954f365727668cb02d04172b34f1149637728","analyzedAt":"2026-08-11T17:46:45.378Z","contentChangedAt":"2026-08-11T17:46:45.378Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}