diff options
| author | xFrednet <xFrednet@gmail.com> | 2024-08-06 11:20:31 +0200 |
|---|---|---|
| committer | Noah Lev <camelidcamel@gmail.com> | 2024-08-07 20:32:37 -0700 |
| commit | 297ebf261e934e0f1b79fad65e4109bf06de55be (patch) | |
| tree | a4defb58f1322f2d22470bf90b7c657851b149e6 /src/doc/rustc-dev-guide | |
| parent | ee84180c2c5ae380a99ddbd7746e10d0237e1b0b (diff) | |
| download | rust-297ebf261e934e0f1b79fad65e4109bf06de55be.tar.gz rust-297ebf261e934e0f1b79fad65e4109bf06de55be.zip | |
Review comments <3
Diffstat (limited to 'src/doc/rustc-dev-guide')
| -rw-r--r-- | src/doc/rustc-dev-guide/src/SUMMARY.md | 2 | ||||
| -rw-r--r-- | src/doc/rustc-dev-guide/src/mir/dataflow.md | 20 |
2 files changed, 11 insertions, 11 deletions
diff --git a/src/doc/rustc-dev-guide/src/SUMMARY.md b/src/doc/rustc-dev-guide/src/SUMMARY.md index 6b70038a38f..7950e46875c 100644 --- a/src/doc/rustc-dev-guide/src/SUMMARY.md +++ b/src/doc/rustc-dev-guide/src/SUMMARY.md @@ -194,7 +194,7 @@ - [Prologue](./part-5-intro.md) - [MIR optimizations](./mir/optimizations.md) -- [Debugging](./mir/debugging.md) +- [Debugging MIR](./mir/debugging.md) - [Constant evaluation](./const-eval.md) - [Interpreter](./const-eval/interpret.md) - [Monomorphization](./backend/monomorph.md) diff --git a/src/doc/rustc-dev-guide/src/mir/dataflow.md b/src/doc/rustc-dev-guide/src/mir/dataflow.md index e6e4b9b1a23..7bd0f0aab4d 100644 --- a/src/doc/rustc-dev-guide/src/mir/dataflow.md +++ b/src/doc/rustc-dev-guide/src/mir/dataflow.md @@ -129,15 +129,15 @@ operator. We use OR and not AND because of this case: ```rust # unsafe fn example(some_cond: bool) { - let x = if some_cond { - std::mem::transmute::<i32, u32>(0_i32) // transmute was called! - } else { - 1_u32 // transmute was not called - }; - - // Has transmute been called by this point? We conservatively approximate that - // as yes, and that is why we use the OR operator. - println!("x: {}", x); +let x = if some_cond { + std::mem::transmute::<i32, u32>(0_i32) // transmute was called! +} else { + 1_u32 // transmute was not called +}; + +// Has transmute been called by this point? We conservatively approximate that +// as yes, and that is why we use the OR operator. +println!("x: {}", x); # } ``` @@ -221,7 +221,7 @@ the example below: ["gen-kill" problems]: https://en.wikipedia.org/wiki/Data-flow_analysis#Bit_vector_problems [*Static Program Analysis*]: https://cs.au.dk/~amoeller/spa/ -[Debugging MIR]: ./debugging.html +[Debugging MIR]: ./debugging.md [`AnalysisDomain`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_mir_dataflow/trait.AnalysisDomain.html [`Analysis`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_mir_dataflow/trait.Analysis.html [`Engine`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_mir_dataflow/struct.Engine.html |
