aboutsummaryrefslogtreecommitdiff
path: root/macros/src/codegen/pre_init.rs
diff options
context:
space:
mode:
authorGravatar bors[bot] <26634292+bors[bot]@users.noreply.github.com> 2021-07-22 10:57:49 +0000
committerGravatar GitHub <noreply@github.com> 2021-07-22 10:57:49 +0000
commit49d4185e3bc3921250dfdf90c2816770adf1625f (patch)
treef89490cd0990be12b0ba8d30e408f64f8c0bc78d /macros/src/codegen/pre_init.rs
parentadb4bc4c4ea85b12a6d7f75821e76ee33a9a8e70 (diff)
parent5f395658f03ccd092d9e17edc949804012869157 (diff)
downloadrtic-49d4185e3bc3921250dfdf90c2816770adf1625f.tar.gz
rtic-49d4185e3bc3921250dfdf90c2816770adf1625f.tar.zst
rtic-49d4185e3bc3921250dfdf90c2816770adf1625f.zip
Merge #501
501: Propogate the task attributes to the spawn handles r=AfoHT a=crawford 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` ``` Co-authored-by: Alex Crawford <rtic@code.acrawford.com>
Diffstat (limited to 'macros/src/codegen/pre_init.rs')
0 files changed, 0 insertions, 0 deletions