Skip to content

Commit b15b601

Browse files
committed
Revise no_std warning
We want to highlight how using `no_std` doesn't prevent `std` from being linked. Let's revise and elaborate this text for clarity.
1 parent 8d7877e commit b15b601

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/names/preludes.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ The *`no_std` [attribute][attributes]* causes the [`std`] crate to not be linked
9393
> Using `no_std` 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`).
9494
9595
> [!WARNING]
96-
> Using `no_std` does not prevent the standard library from being linked in. It is still valid to put `extern crate std;` into the crate and dependencies can also link it in.
96+
> Using `no_std` does not prevent the standard library from being linked. It is still valid to write `extern crate std` in the crate or in one of its dependencies; this will cause the compiler to link the `std` crate into the program.
9797
9898
r[names.preludes.extern.no_std.syntax]
9999
The `no_std` attribute uses the [MetaWord] syntax.

0 commit comments

Comments
 (0)