Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit f2f56b1

Browse files
committedMar 22, 2025·
Document the order preludes are resolved
1 parent 5167e13 commit f2f56b1

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed
 

‎src/names/preludes.md

+10
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,16 @@ r[names.preludes.tool.intro]
142142
The tool prelude includes tool names for external tools in the [type
143143
namespace]. See the [tool attributes] section for more details.
144144
145+
r[names.preludes.precedence]
146+
## Prelude precedence
147+
Names of items are resolved in the following order:
148+
149+
1. 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
154+
145155
r[names.preludes.no_implicit_prelude]
146156
## The `no_implicit_prelude` attribute
147157

0 commit comments

Comments
 (0)
Please sign in to comment.