dtolnay / dtolnay/async-trait

Can not find 'Box' on no_std environments

Open
#295 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
2.2k
Forks
101
PR merge metrics
No merged PRs in 30d

Description

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;

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.