Skip to content

Commit 8d7877e

Browse files
committed
Revise no_std intro WRT the preludes
We had text in the intro about "deferring to the core crate instead", but it may not have been sufficiently clear what we mean exactly by that. Let's talk specifically about how `no_std` causes us to use the `core` crate for the standard library prelude and for the `macro_use` prelude.
1 parent ae893d6 commit 8d7877e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/names/preludes.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ r[names.preludes.extern.no_std]
8181
### The `no_std` attribute
8282
8383
r[names.preludes.extern.no_std.intro]
84-
The *`no_std` [attribute][attributes]* causes the [`std`] crate to not be linked automatically, deferring to the [`core`] crate instead.
84+
The *`no_std` [attribute][attributes]* causes the [`std`] crate to not be linked automatically, the [standard library prelude] to instead use the `core` prelude, and the [`macro_use` prelude] to instead use the macros exported from the `core` crate.
8585
8686
> [!EXAMPLE]
8787
> <!-- ignore: test infrastructure can't handle no_std -->
@@ -183,7 +183,7 @@ r[names.preludes.no_implicit_prelude.edition2018]
183183
[Machine-dependent integer types]: ../types/numeric.md#machine-dependent-integer-types
184184
[Macro namespace]: namespaces.md
185185
[name resolution]: name-resolution.md
186-
[Standard library prelude]: #standard-library-prelude
186+
[standard library prelude]: names.preludes.std
187187
[Textual types]: ../types/textual.md
188188
[tool attributes]: ../attributes.md#tool-attributes
189189
[Tool prelude]: #tool-prelude

0 commit comments

Comments
 (0)