Closed
Description
#![no_std]
extern crate alloc;
use alloc::vec::Vec;
pub fn f() -> Vec<u8> {
let x = alloc::vec![
0,
].into_boxed_slice();
return x.to_vec();
}
Compiling playground v0.0.1 (/playground)
error: cannot find macro `vec!` in this scope
--> src/lib.rs:8:13
|
8 | let x = alloc::vec![
| _____________^
9 | | 0,
10 | | ].into_boxed_slice();
| |_____^
|
= note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
error: aborting due to previous error
error: Could not compile `playground`.
If I change the invocation to alloc::vec![]
it has no trouble finding the invocation. I have no idea what to make of this.