Open
Description
Hi!
I am trying to craft a environment for my embedded board.
Trying to use ufmt uwrite! with alloc::string::String but getting such errors:
error[E0599]: the method `do_as_formatter` exists for struct `String`, but its trait bounds were not satisfied
--> src/main.rs:24:9
|
24 | ufmt::uwrite!(s, "hello from rust: {}!\n", i);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ method cannot be called on `String` due to unsatisfied trait bounds
|
::: /home/mateusz/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/string.rs:278:1
|
278 | pub struct String {
| -----------------
| |
| doesn't satisfy `String: UnstableDoAsFormatter`
| doesn't satisfy `String: uWrite`
|
= note: the following trait bounds were not satisfied:
`String: uWrite`
which is required by `String: UnstableDoAsFormatter`
`str: uWrite`
which is required by `str: UnstableDoAsFormatter`
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
I already have a working allocator since the underlying system is based on nuttx and I just use libc_alloc with uses malloc and other options from directly nuttx libc.
I would be really grateful for any help, I am stuck with that currently
Metadata
Metadata
Assignees
Labels
No labels