This error is pretty curious, I wonder if that is due to core changes since I remember Box should have had handled Format to passthrough transparently to the underlying type:
(base) PS C:\Users\steve\esp32c2-rust-hello-world> cargo build
Compiling smoltcp v0.8.2
Compiling esp32c3-hal v0.3.0
Compiling esp-wifi v0.1.0 (https://github.com/esp-rs/esp-wifi.git?rev=4d8243f#4d8243f7)
error[E0277]: the trait bound `Box<[Contig; 32]>: Format` is not satisfied
--> C:\Users\steve\.cargo\registry\src\github.com-1ecc6299db9ec823\smoltcp-0.8.2\src\storage\assembler.rs:104:5
|
99 | #[cfg_attr(feature = "defmt", derive(defmt::Format))]
| ------------- required by a bound introduced by this call
...
104 | contigs: Box<[Contig; CONTIG_COUNT]>,
| ^^^^^^^ the trait `Format` is not implemented for `Box<[Contig; 32]>`
|
= 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 185 others
note: required by a bound in `defmt::export::fmt`
--> C:\Users\steve\.cargo\registry\src\github.com-1ecc6299db9ec823\defmt-0.3.2\src\export\mod.rs:137:15
|
137 | pub fn fmt<T: Format + ?Sized>(f: &T) {
| ^^^^^^ required by this bound in `defmt::export::fmt`
For more information about this error, try `rustc --explain E0277`.
error: could not compile `smoltcp` due to previous error
warning: build failed, waiting for other jobs to finish...
This error is pretty curious, I wonder if that is due to
core
changes since I rememberBox
should have had handledFormat
to passthrough transparently to the underlying type:Cargo.toml entry:
If I disabled
alloc
ordefmt
it is absolutely working: https://github.com/smoltcp-rs/smoltcp/blob/0e614bc6cca8b97a1a11c27154f76221c5403739/src/storage/assembler.rs#L98-L99