Skip to content

Commit 6441f7e

Browse files
committed
Rewrite no_implicit_prelude to move to a specific rule
This rewrites the intro to be a little more general, and moves the description of the behavior to a specific rule that can be cited.
1 parent 0918563 commit 6441f7e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/names/preludes.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ r[names.preludes.no_implicit_prelude]
144144
## The `no_implicit_prelude` attribute
145145
146146
r[names.preludes.no_implicit_prelude.intro]
147-
The *`no_implicit_prelude` [attribute]* may be applied at the crate level or on a module to indicate that it should not automatically bring the [standard library prelude], [extern prelude], or [tool prelude] into scope for that module or any of its descendants.
147+
The *`no_implicit_prelude` [attribute]* is used to prevent implicit preludes from being brought into scope.
148148
149149
> [!EXAMPLE]
150150
> ```rust
@@ -173,6 +173,9 @@ Duplicate instances of the `no_implicit_prelude` attribute have no effect.
173173
> [!NOTE]
174174
> `rustc` currently warns on subsequent duplicate `no_implicit_prelude` attributes.
175175
176+
r[names.preludes.no_implicit_prelude.excluded-preludes]
177+
The `no_implicit_prelude` attribute prevents the [standard library prelude], [extern prelude], and the [tool prelude] from being brought into scope for the module or any of its descendants.
178+
176179
r[names.preludes.no_implicit_prelude.lang]
177180
This attribute does not affect the [language prelude].
178181

0 commit comments

Comments
 (0)