Skip to content

Commit d4ca54a

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 8a3e7b7 commit d4ca54a

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
@@ -143,7 +143,7 @@ r[names.preludes.no_implicit_prelude]
143143
## The `no_implicit_prelude` attribute
144144
145145
r[names.preludes.no_implicit_prelude.intro]
146-
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.
146+
The *`no_implicit_prelude` [attribute]* is used to prevent implicit preludes from being brought into scope.
147147
148148
> [!EXAMPLE]
149149
> ```rust
@@ -172,6 +172,9 @@ Duplicate instances of the `no_implicit_prelude` attribute have no effect.
172172
> [!NOTE]
173173
> `rustc` currently warns on subsequent duplicate `no_implicit_prelude` attributes.
174174
175+
r[names.preludes.no_implicit_prelude.excluded-preludes]
176+
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.
177+
175178
r[names.preludes.no_implicit_prelude.lang]
176179
This attribute does not affect the [language prelude].
177180

0 commit comments

Comments
 (0)