Skip to content

Commit dea61cb

Browse files
ehusstraviscross
authored andcommitted
Add example to no_std intro
1 parent acb4347 commit dea61cb

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/names/preludes.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,12 @@ r[names.preludes.extern.no_std]
8282
r[names.preludes.extern.no_std.intro]
8383
By default, the standard library is automatically included in the crate root module. The [`std`] crate is added to the root, along with an implicit [`macro_use` attribute] pulling in all macros exported from `std` into the [`macro_use` prelude]. Both [`core`] and [`std`] are added to the [extern prelude].
8484
85+
> [!EXAMPLE]
86+
> <!-- ignore: test infrastructure can't handle no_std -->
87+
> ```rust,ignore
88+
> #![no_std]
89+
> ```
90+
8591
r[names.preludes.extern.no_std.syntax]
8692
The `no_std` attribute uses the [MetaWord] syntax and thus does not take any inputs.
8793

0 commit comments

Comments
 (0)