Skip to content

Commit

Permalink
Review comments <3
Browse files Browse the repository at this point in the history
  • Loading branch information
xFrednet authored and camelid committed Aug 8, 2024
1 parent 3fbb21e commit 9c47f8c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion src/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
20 changes: 10 additions & 10 deletions src/mir/dataflow.md
Original file line number Diff line number Diff line change
Expand Up @@ -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);
# }
```

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 9c47f8c

Please sign in to comment.