We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent eca6b28 commit 34a3a36Copy full SHA for 34a3a36
text/0000-liballoc.md
@@ -95,9 +95,10 @@ use alloc::rc::Rc;
95
Like `std` and `core`, this dependency does not need to be declared in `Cargo.toml`
96
since `alloc` is part of the standard library and distributed with Rust.
97
98
-The `alloc` crate does not have a prelude (items that are implicitly in scope).
99
-So its items that are in the `std` prelude must be imported explicitly
100
-to be used in `no_std` crates:
+The prelude (set of items that are implicitly in scope) for `#![no_std]` crates
+does not assume the presence of the `alloc` crate, unlike the default prelude.
+So in such crates, items from `alloc` always need to be imported explicitly.
101
+For example:
102
103
```rust
104
use alloc::vec::Vec;
0 commit comments