@@ -146,11 +146,29 @@ r[names.preludes.precedence]
146146## Prelude precedence
147147Names of items are resolved in the following order:
148148
149+ Value namespace: only the standard library prelude contains items in this namespace.
150+
151+ 1. Explicit definitions (including imports)
152+ 2. Standard library prelude
153+
154+ Type namespace:
155+
1491561. Explicit definitions (including imports)
150- 2. Language and macro prelude. If an item is present in both preludes, an error is emitted.
151- 3. Extern prelude
152- 4. Tool prelude
153- 5. Standard library prelude
157+ 2. Extern prelude
158+ 3. Tool prelude
159+ 4. Standard library prelude
160+ 5. Language prelude
161+
162+ Macro namespace:
163+
164+ 1. Explicit definitions (including imports)
165+ 1. [Derive helpers]
166+ 2. [Macros by example][macro_rules]
167+ 2. Macro prelude
168+ 3. Standard library prelude
169+ 4. [Language prelude][Built- in attributes]
170+
171+ Currently, the ordering between library and language is not observable because there are no items in both namespaces.
154172
155173r[names. preludes. no_implicit_prelude]
156174## The `no_implicit_prelude` attribute
@@ -171,6 +189,8 @@ r[names.preludes.no_implicit_prelude.edition2018]
171189> Starting in the 2018 edition, it will remove the `macro_use` prelude.
172190
173191[`extern crate `]: .. / items/ extern - crates. md
192+ [macro_rules]: .. / macros- by- example. md
193+ [Derive helpers]: .. / names/ scopes. html#derive- macro - helper- attributes
174194[`macro_use` attribute]: .. / macros- by- example. md#the- macro_use- attribute
175195[`macro_use` prelude]: #macro_use- prelude
176196[`no_std` attribute]: #the- no_std- attribute
0 commit comments