File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ of such structures include but are not limited to
1616 * Converted to a virtual ` existential type ` declaration
1717
1818Lowering needs to uphold several invariants in order to not trigger the
19- sanity checks in ` compiler/rustc_passes/src/hir_id_validator.rs ` :
19+ sanity checks in [ ` compiler/rustc_passes/src/hir_id_validator.rs ` ] [ hir_id_validator ] :
2020
21211 . A ` HirId ` must be used if created. So if you use the ` lower_node_id ` ,
2222 you * must* use the resulting ` NodeId ` or ` HirId ` (either is fine, since
@@ -33,6 +33,8 @@ sanity checks in `compiler/rustc_passes/src/hir_id_validator.rs`:
3333 which produces both a new ` NodeId ` as well as automatically lowering it
3434 for you so you also get the ` HirId ` .
3535
36+ [ hir_id_validator ] : https://github.com/rust-lang/rust/blob/HEAD/compiler/rustc_passes/src/hir_id_validator.rs
37+
3638If you are creating new ` DefId ` s, since each ` DefId ` needs to have a
3739corresponding ` NodeId ` , it is advisable to add these ` NodeId ` s to the
3840` AST ` so you don't have to generate new ones during lowering. This has
You can’t perform that action at this time.
0 commit comments