Skip to content

Commit afed4f6

Browse files
committed
Reflect explicit macro import in reference
1 parent e122eef commit afed4f6

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

src/names/preludes.md

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -79,12 +79,11 @@ alloc/test limitation.
7979
r[names.preludes.extern.no_std]
8080
### The `no_std` attribute
8181
82-
r[names.preludes.extern.no_std.intro]
83-
By default, the standard library is automatically included in the crate root
84-
module. The [`std`] crate is added to the root, along with an implicit
85-
[`macro_use` attribute] pulling in all macros exported from `std` into the
86-
[`macro_use` prelude]. Both [`core`] and [`std`] are added to the [extern
87-
prelude].
82+
r[names.preludes.extern.no_std.intro] By default, the standard library is
83+
automatically included in the crate root module. The [`std`] crate is added to
84+
the root. Both [`core`] and [`std`] are added to the [extern prelude]. Standard
85+
library macros are imported via [use declarations] and are *not* part of the
86+
[`macro_use` prelude].
8887
8988
r[names.preludes.extern.no_std.allowed-positions]
9089
The *`no_std` [attribute]* may be applied at the crate level to prevent the
@@ -97,8 +96,7 @@ r[names.preludes.extern.no_std.extern]
9796
r[names.preludes.extern.no_std.module]
9897
* Affects which module is used to make up the [standard library prelude] (as described above).
9998
r[names.preludes.extern.no_std.core]
100-
* Injects the [`core`] crate into the crate root instead of [`std`], and pulls
101-
in all macros exported from `core` in the [`macro_use` prelude].
99+
* Injects the [`core`] crate into the crate root instead of [`std`].
102100
103101
> [!NOTE]
104102
> Using the core prelude over the standard prelude is useful when either the crate is targeting a platform that does not support the standard library or is purposefully not using the capabilities of the standard library. Those capabilities are mainly dynamic memory allocation (e.g. `Box` and `Vec`) and file and network capabilities (e.g. `std::fs` and `std::io`).

0 commit comments

Comments
 (0)