Skip to content

Commit be890df

Browse files
committed
Review comments <3
1 parent e197b2e commit be890df

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

src/SUMMARY.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@
194194

195195
- [Prologue](./part-5-intro.md)
196196
- [MIR optimizations](./mir/optimizations.md)
197-
- [Debugging](./mir/debugging.md)
197+
- [Debugging MIR](./mir/debugging.md)
198198
- [Constant evaluation](./const-eval.md)
199199
- [Interpreter](./const-eval/interpret.md)
200200
- [Monomorphization](./backend/monomorph.md)

src/mir/dataflow.md

+10-10
Original file line numberDiff line numberDiff line change
@@ -129,15 +129,15 @@ operator. We use OR and not AND because of this case:
129129

130130
```rust
131131
# unsafe fn example(some_cond: bool) {
132-
let x = if some_cond {
133-
std::mem::transmute::<i32, u32>(0_i32) // transmute was called!
134-
} else {
135-
1_u32 // transmute was not called
136-
};
137-
138-
// Has transmute been called by this point? We conservatively approximate that
139-
// as yes, and that is why we use the OR operator.
140-
println!("x: {}", x);
132+
let x = if some_cond {
133+
std::mem::transmute::<i32, u32>(0_i32) // transmute was called!
134+
} else {
135+
1_u32 // transmute was not called
136+
};
137+
138+
// Has transmute been called by this point? We conservatively approximate that
139+
// as yes, and that is why we use the OR operator.
140+
println!("x: {}", x);
141141
# }
142142
```
143143

@@ -221,7 +221,7 @@ the example below:
221221

222222
["gen-kill" problems]: https://en.wikipedia.org/wiki/Data-flow_analysis#Bit_vector_problems
223223
[*Static Program Analysis*]: https://cs.au.dk/~amoeller/spa/
224-
[Debugging MIR]: ./debugging.html
224+
[Debugging MIR]: ./debugging.md
225225
[`AnalysisDomain`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_mir_dataflow/trait.AnalysisDomain.html
226226
[`Analysis`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_mir_dataflow/trait.Analysis.html
227227
[`Engine`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_mir_dataflow/struct.Engine.html

0 commit comments

Comments
 (0)