Skip to content

Commit e85c4c4

Browse files
tshepangcamelid
andauthored
do an actual link to detect if it breaks in future (#1517)
Co-authored-by: Noah Lev <camelidcamel@gmail.com>
1 parent 2889c29 commit e85c4c4

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/queries/incremental-compilation-in-detail.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -175,19 +175,19 @@ fn try_mark_green(tcx, current_node) -> bool {
175175
176176
true
177177
}
178-
179-
// Note: The actual implementation can be found in
180-
// compiler/rustc_query_system/src/dep_graph/graph.rs
181178
```
182179

180+
> NOTE:
181+
> The actual implementation can be found in
182+
> [`compiler/rustc_query_system/src/dep_graph/graph.rs`][try_mark_green]
183+
183184
By using red-green marking we can avoid the devastating cumulative effect of
184185
having false positives during change detection. Whenever a query is executed
185186
in incremental mode, we first check if its already green. If not, we run
186187
`try_mark_green()` on it. If it still isn't green after that, then we actually
187188
invoke the query provider to re-compute the result.
188189

189190

190-
191191
## The Real World: How Persistence Makes Everything Complicated
192192

193193
The sections above described the underlying algorithm for incremental
@@ -533,5 +533,5 @@ be reusable. See <https://github.com/rust-lang/rust/issues/47389> for more
533533
information.
534534

535535

536-
537536
[query-model]: ./query-evaluation-model-in-detail.html
537+
[try_mark_green]: https://doc.rust-lang.org/nightly/nightly-rustc/src/rustc_query_system/dep_graph/graph.rs.html

0 commit comments

Comments
 (0)