Skip to content

Commit 0181f23

Browse files
committed
2021 edition standard library prelude changes: address review comments
1 parent dfc94ed commit 0181f23

File tree

1 file changed

+10
-11
lines changed

1 file changed

+10
-11
lines changed

src/names/preludes.md

+10-11
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,15 @@ There are several different preludes:
1818

1919
## Standard library prelude
2020

21-
Each crate has a standard library prelude, which consists of the names from a single standard library module. The module used depends on the crate's edition, and on whether the [`no_std` attribute] is applied to the crate:
21+
Each crate has a standard library prelude, which consists of the names from a single standard library module.
22+
The module used depends on the crate's edition, and on whether the [`no_std` attribute] is applied to the crate:
2223

2324
Edition | `no_std` not applied | `no_std` applied
2425
--------| --------------------------- | ----------------------------
2526
2015 | [`std::prelude::rust_2015`] | [`core::prelude::rust_2015`]
2627
2018 | [`std::prelude::rust_2018`] | [`core::prelude::rust_2018`]
2728
2021 | [`std::prelude::rust_2021`] | [`core::prelude::rust_2021`]
2829

29-
This choice of prelude is in effect throughout the crate, including code generated by macros defined in crates with a different edition or `no_std` attribute.
30-
3130

3231
> **Note**:
3332
>
@@ -140,20 +139,20 @@ This attribute does not affect the [language prelude].
140139
141140
[`alloc`]: ../../alloc/index.html
142141
[`Box`]: ../../std/boxed/struct.Box.html
143-
[`core::prelude::v1`]: ../../core/prelude/index.html
144-
[`core::prelude::rust_2015`]: ../../core/prelude/index.html
145-
[`core::prelude::rust_2018`]: ../../core/prelude/index.html
146-
[`core::prelude::rust_2021`]: ../../core/prelude/index.html
142+
[`core::prelude::v1`]: ../../core/prelude/v1/index.html
143+
[`core::prelude::rust_2015`]: ../../core/prelude/rust_2015/index.html
144+
[`core::prelude::rust_2018`]: ../../core/prelude/rust_2018/index.html
145+
[`core::prelude::rust_2021`]: ../../core/prelude/rust_2021/index.html
147146
[`core`]: ../../core/index.html
148147
[`extern crate`]: ../items/extern-crates.md
149148
[`macro_use` attribute]: ../macros-by-example.md#the-macro_use-attribute
150149
[`macro_use` prelude]: #macro_use-prelude
151150
[`no_std` attribute]: #the-no_std-attribute
152151
[`no_std` attribute]: #the-no_std-attribute
153-
[`std::prelude::v1`]: ../../std/prelude/index.html
154-
[`std::prelude::rust_2015`]: ../../std/prelude/index.html
155-
[`std::prelude::rust_2018`]: ../../std/prelude/index.html
156-
[`std::prelude::rust_2021`]: ../../std/prelude/index.html
152+
[`std::prelude::v1`]: ../../std/prelude/v1/index.html
153+
[`std::prelude::rust_2015`]: ../../std/prelude/rust_2015/index.html
154+
[`std::prelude::rust_2018`]: ../../std/prelude/rust_2018/index.html
155+
[`std::prelude::rust_2021`]: ../../std/prelude/rust_2021/index.html
157156
[`std`]: ../../std/index.html
158157
[`test`]: ../../test/index.html
159158
[attribute]: ../attributes.md

0 commit comments

Comments
 (0)