reference icon indicating copy to clipboard operation
reference copied to clipboard

Reflect explicit macro import in reference

Open Voultapher opened this issue 2 months ago • 6 comments

Companion PR for https://github.com/rust-lang/rust/pull/139493

Voultapher avatar Nov 08 '25 10:11 Voultapher

:umbrella: The latest upstream changes (possibly bbb5cc6e44abe829c075fe38fa6aaad18085f595) made this pull request unmergeable. Please resolve the merge conflicts.

rustbot avatar Nov 11 '25 23:11 rustbot

I've updated the PR, it's not clear to me what changes are still desired please re-review.

Voultapher avatar Nov 15 '25 10:11 Voultapher

Can you rebase on latest master now that https://github.com/rust-lang/reference/pull/1913 has been merged?

I would suggest the following edits:

diff --git a/src/names/preludes.md b/src/names/preludes.md
index 3a2c3ff1..b25b4b8a 100644
--- a/src/names/preludes.md
+++ b/src/names/preludes.md
@@ -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 -->
@@ -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.

ehuss avatar Nov 15 '25 22:11 ehuss

This PR was rebased onto a different master commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

rustbot avatar Nov 17 '25 17:11 rustbot

My bad, I had forgotten to track upstream. First PR in this repo.

Voultapher avatar Nov 17 '25 17:11 Voultapher

I've applied your feedback and added a section to name-resolution.md

Voultapher avatar Nov 17 '25 17:11 Voultapher

:umbrella: The latest upstream changes (possibly 4d81027cd647bddca7b96e314512c971c086c418) made this pull request unmergeable. Please resolve the merge conflicts.

rustbot avatar Dec 17 '25 01:12 rustbot