Skip to content

Commit 23bf5ec

Browse files
camelidNoratrieb
authored andcommitted
Move example code block to paragraph referencing it
Noticed by Mario Carneiro.
1 parent cb22326 commit 23bf5ec

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/mir/index.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -62,12 +62,6 @@ show you the MIR for your program. Try putting this program into play
6262
button on the top:
6363

6464
[sample-play]: https://play.rust-lang.org/?gist=30074856e62e74e91f06abd19bd72ece&version=stable
65-
MIR shown by above link is optimized.
66-
Some statements like `StorageLive` are removed in optimization.
67-
This happens because the compiler notices the value is never accessed in the code.
68-
We can use `rustc [filename].rs -Z mir-opt-level=0 --emit mir` to view unoptimized MIR.
69-
This requires the nightly toolchain.
70-
7165

7266
```rust
7367
fn main() {
@@ -88,6 +82,12 @@ fn main() -> () {
8882
```
8983

9084
This is the MIR format for the `main` function.
85+
MIR shown by above link is optimized.
86+
Some statements like `StorageLive` are removed in optimization.
87+
This happens because the compiler notices the value is never accessed in the code.
88+
We can use `rustc [filename].rs -Z mir-opt-level=0 --emit mir` to view unoptimized MIR.
89+
This requires the nightly toolchain.
90+
9191

9292
**Variable declarations.** If we drill in a bit, we'll see it begins
9393
with a bunch of variable declarations. They look like this:

0 commit comments

Comments
 (0)