mirror of
https://github.com/rtic-rs/rtic.git
synced 2024-12-28 12:59:34 +01:00
5f395658f0
This allows tasks to be gated by `cfg` attributes when also using monotonics. For example: ```rust #[cfg(feature = "logging")] #[task(shared = [logger])] fn logger_init(mut cx: logger_init::Context) { /* ... */ } ``` Without this change, the reschedule_at() implementation is unconditionally included even though it references the SpawnHandle from its task module, which is _conditionally_ included. This resulted in compiler errors like the following: ``` error[E0433]: failed to resolve: use of undeclared crate or module `logger_init` --> src/main.rs:243:8 | 243 | fn logger_init(mut cx: logger_init::Context) { | ^^^^^^^^^^^ use of undeclared crate or module `logger_init` ``` |
||
---|---|---|
.. | ||
assertions.rs | ||
dispatchers.rs | ||
hardware_tasks.rs | ||
idle.rs | ||
init.rs | ||
local_resources.rs | ||
local_resources_struct.rs | ||
module.rs | ||
post_init.rs | ||
pre_init.rs | ||
shared_resources.rs | ||
shared_resources_struct.rs | ||
software_tasks.rs | ||
timer_queue.rs | ||
util.rs |