stm32-rs / stm32f4xx-hal

A Rust embedded-hal HAL for all MCUs in the STM32 F4 family

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

defmt: trait `Format` is not implemented for `Date`

alexxy opened this issue · comments

using recent v0.16.1 i get error when using defmt

   Compiling stm32f4xx-hal v0.16.1
error[E0277]: the trait bound `Date: Format` is not satisfied
   --> /home/alexxy/.cargo/registry/src/index.crates.io-6f17d22bba15001f/stm32f4xx-hal-0.16.1/src/rtc.rs:46:38
    |
46  | #[cfg_attr(feature = "defmt", derive(defmt::Format))]
    |                                      ^^^^^^^^^^^^^ the trait `Format` is not implemented for `Date`
    |
    = help: the following other types implement trait `Format`:
              &T
              &mut T
              ()
              (T0, T1)
              (T0, T1, T2)
              (T0, T1, T2, T3)
              (T0, T1, T2, T3, T4)
              (T0, T1, T2, T3, T4, T5)
            and 172 others
note: required by a bound in `defmt::export::fmt`
   --> /home/alexxy/.cargo/registry/src/index.crates.io-6f17d22bba15001f/defmt-0.3.5/src/export/mod.rs:137:15
    |
137 | pub fn fmt<T: Format + ?Sized>(f: &T) {
    |               ^^^^^^ required by this bound in `fmt`
    = note: this error originates in the derive macro `defmt::Format` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0277]: the trait bound `Weekday: Format` is not satisfied
   --> /home/alexxy/.cargo/registry/src/index.crates.io-6f17d22bba15001f/stm32f4xx-hal-0.16.1/src/rtc.rs:46:38
    |
46  | #[cfg_attr(feature = "defmt", derive(defmt::Format))]
    |                                      ^^^^^^^^^^^^^ the trait `Format` is not implemented for `Weekday`
    |
    = help: the following other types implement trait `Format`:
              &T
              &mut T
              ()
              (T0, T1)
              (T0, T1, T2)
              (T0, T1, T2, T3)
              (T0, T1, T2, T3, T4)
              (T0, T1, T2, T3, T4, T5)
            and 172 others
note: required by a bound in `defmt::export::fmt`
   --> /home/alexxy/.cargo/registry/src/index.crates.io-6f17d22bba15001f/defmt-0.3.5/src/export/mod.rs:137:15
    |
137 | pub fn fmt<T: Format + ?Sized>(f: &T) {
    |               ^^^^^^ required by this bound in `fmt`
    = note: this error originates in the derive macro `defmt::Format` (in Nightly builds, run with -Z macro-backtrace for more info)