Skip to content

Commit a2b8f93

Browse files
ehusstraviscross
authored andcommitted
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 b5e3e26 commit a2b8f93

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
@@ -155,7 +155,7 @@ r[names.preludes.no_implicit_prelude]
155155
## The `no_implicit_prelude` attribute
156156
157157
r[names.preludes.no_implicit_prelude.intro]
158-
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.
158+
The *`no_implicit_prelude` [attribute]* is used to prevent implicit preludes from being brought into scope.
159159
160160
> [!EXAMPLE]
161161
> ```rust
@@ -184,6 +184,9 @@ Duplicate instances of the `no_implicit_prelude` attribute have no effect.
184184
> [!NOTE]
185185
> `rustc` currently warns on subsequent duplicate `no_implicit_prelude` attributes.
186186
187+
r[names.preludes.no_implicit_prelude.excluded-preludes]
188+
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.
189+
187190
r[names.preludes.no_implicit_prelude.lang]
188191
This attribute does not affect the [language prelude].
189192

0 commit comments

Comments
 (0)