Skip to content

Can not find 'Box' on no_std environments #295

Description

@NikoPit

when i use async-trait on an no_std environment, it will complain about unable to find box, even tho i have alloc:

error[E0425]: cannot find type Box in this scope
--> keyboard/src/lib.rs:11:1
|
11 | / make_capability! {
12 | | name = KeyboardCapability;
13 | | async fn read_key(
14 | | &self,
15 | | ) -> KeyEvent;
16 | | }
| |_^ not found in this scope
|
= note: this error originates in the attribute macro $crate::async_trait::async_trait which comes from the expansion of the macro make_capability (in Nightly builds, run
with -Z macro-backtrace for more info)
help: consider importing this struct
|
4 + use alloc::boxed::Box;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions