diff --git a/examples/t-schedule.rs b/examples/t-schedule.rs index d7051609f7..4ce62b47f0 100644 --- a/examples/t-schedule.rs +++ b/examples/t-schedule.rs @@ -7,11 +7,15 @@ use panic_semihosting as _; +pub struct SomeStruct; + #[rtic::app(device = lm3s6965, dispatchers = [SSI0])] mod app { use dwt_systick_monotonic::DwtSystick; use rtic::time::duration::Seconds; + use super::SomeStruct; + #[monotonic(binds = SysTick, default = true)] type MyMono = DwtSystick<8_000_000>; // 8 MHz diff --git a/macros/src/codegen.rs b/macros/src/codegen.rs index e0e09bbe8a..1096f6f1e7 100644 --- a/macros/src/codegen.rs +++ b/macros/src/codegen.rs @@ -163,6 +163,11 @@ pub fn app(app: &App, analysis: &Analysis, extra: &Extra) -> TokenStream2 { /// Holds static methods for each monotonic. pub mod monotonics { + #( + #[allow(unused_imports)] + #user_imports + )* + #(#monotonic_parts)* } )