Build error when compiling with `esp-idf`
I get this error:
error[E0223]: ambiguous associated type
--> /home/esp/.cargo/registry/src/index.crates.io-6f17d22bba15001f/heapless-0.9.1/src/c_string.rs:181:17
|
181 | Err(FromBytesWithNulError::InteriorNul { position }) => {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
help: if there were a trait named `Example` with associated type `InteriorNul` implemented for `FromBytesWithNulError`, you could use the fully-qualified path
|
181 | Err(<FromBytesWithNulError as Example>::InteriorNul { position }) => {
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
error[E0599]: no associated item named `NotNulTerminated` found for struct `FromBytesWithNulError` in the current scope
--> /home/esp/.cargo/registry/src/index.crates.io-6f17d22bba15001f/heapless-0.9.1/src/c_string.rs:184:40
|
184 | Err(FromBytesWithNulError::NotNulTerminated) => {
| ^^^^^^^^^^^^^^^^ associated item not found in `FromBytesWithNulError`
Which seems to be coming from this package.
This happens when using with HistoryBuf to be more exact
How are you building your software to obtain this error? It looks like some types from the standard library have been modified. Which version of the Rust compiler are you using?
It's the esp-idf toolchain for std rust that can be found here
For reference is that version 0.8.0 worked flawlessly with the beforehand named HistoryBuffer
Looks like this is an issue coming from the fork of std used by the esp compiler. It looks like it has been fixed in version 1.89 of the fork:
https://github.com/esp-rs/rust/commit/2f5a3d4b06a0a9e8749c2e361758ec517df0c96a
It's available as a pre-release. Please test that: https://github.com/esp-rs/rust-build/releases/tag/v1.89.0.0
will do and report back on monday-tuesday
Have you been able to check back?
Had some talk with my guys and there were some complication that prevented us from using that specific build, so it's a bit tricky.