Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/names/name-resolution.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,6 @@

> [!NOTE]
> This is a placeholder for future expansion.

r[names.name_resolution.ambiguous_panic_imports]
For editions 2024 and earlier the `ambiguous_panic_imports` lint is issued if the import of two builtin macros is ambiguous and they are named `sym::panic`. This can only happen for `core::panic` and `std::panic`.
5 changes: 1 addition & 4 deletions src/names/preludes.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ r[names.preludes.extern.no_std]
### The `no_std` attribute

r[names.preludes.extern.no_std.intro]
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.
The *`no_std` [attribute][attributes]* causes the [`std`] crate to not be linked automatically and the [standard library prelude] to instead use the `core` prelude.

> [!EXAMPLE]
> <!-- ignore: test infrastructure can't handle no_std -->
Expand Down Expand Up @@ -110,9 +110,6 @@ The `no_std` attribute may be used any number of times on a form.
r[names.preludes.extern.no_std.module]
The `no_std` attribute changes the [standard library prelude] to use the `core` prelude instead of the `std` prelude.

r[names.preludes.extern.no_std.macro_use]
By default, all macros exported from the `std` crate are added to the [`macro_use` prelude]. If the `no_std` attribute is specified, then all macros exported from the `core` crate are placed into the [`macro_use` prelude] instead.

r[names.preludes.extern.no_std.edition2018]
> [!EDITION-2018]
> Before the 2018 edition, `std` is injected into the crate root by default. If `no_std` is specified, `core` is injected instead. Starting with the 2018 edition, regardless of `no_std` being specified, neither is injected into the crate root.
Expand Down