Skip to content

Commit 8a02371

Browse files
committed
Improve doc.
1 parent 9e4f296 commit 8a02371

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

src/doc/unstable-book/src/compiler-flags/codegen-source-order.md

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,10 @@
33
---
44

55
This feature allows you to have a predictive and
6-
deterministic order for items after codegen.
6+
deterministic order for items after codegen, which
7+
is the same as in source code.
78

89
For every `CodegenUnit`, local `MonoItem`s would
9-
be sorted by `(Span, DefPath, SymbolName)`, which
10+
be sorted by `(Span, SymbolName)`, which
1011
makes codegen tests rely on the order of items in
1112
source files work.
12-
13-
Note: If you would like to use it, you have to
14-
manually sort items that are generated by a macro
15-
in lexicographical order in source files, because
16-
of the same spans owned by all items of a macro.
17-
So we have to distinguish them by `DefPath`s.

0 commit comments

Comments
 (0)