Skip to content

Commit 70fa8bd

Browse files
ehusstraviscross
authored andcommitted
Minor update of no_implicit_prelude
More closely align with the template, and some minor word tweaks.
1 parent 0ed80f7 commit 70fa8bd

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/names/preludes.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,7 @@ r[names.preludes.tool.intro]
151151
The tool prelude includes tool names for external tools in the [type
152152
namespace]. See the [tool attributes] section for more details.
153153
154+
<!-- template:attributes -->
154155
r[names.preludes.no_implicit_prelude]
155156
## The `no_implicit_prelude` attribute
156157
@@ -170,19 +171,19 @@ The *`no_implicit_prelude` [attribute]* is used to prevent implicit preludes fro
170171
> ```
171172
172173
r[names.preludes.no_implicit_prelude.syntax]
173-
The `no_implicit_prelude` attribute uses the [MetaWord] syntax and thus does not take any inputs.
174+
The `no_implicit_prelude` attribute uses the [MetaWord] syntax.
174175
175176
r[names.preludes.no_implicit_prelude.allowed-positions]
176177
The `no_implicit_prelude` attribute may only be applied to the crate level or a module.
177178
178179
> [!NOTE]
179-
> `rustc` currently warns in other positions, but this may be rejected in the future.
180+
> `rustc` ignores use in other positions but lints against it. This may become an error in the future.
180181
181182
r[names.preludes.no_implicit_prelude.duplicates]
182-
Duplicate instances of the `no_implicit_prelude` attribute have no effect.
183+
The `no_implicit_prelude` attribute may be used any number of times on a form.
183184
184185
> [!NOTE]
185-
> `rustc` currently warns on subsequent duplicate `no_implicit_prelude` attributes.
186+
> `rustc` lints against any use following the first.
186187
187188
r[names.preludes.no_implicit_prelude.excluded-preludes]
188189
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.

0 commit comments

Comments
 (0)