mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-28 02:57:37 +00:00
Add in some <hr>s for emphasis
It's not really clear here, since the example is rendered, where it starts and ends. So let's use <hr>s to split it up.
This commit is contained in:
parent
17a2cb443a
commit
f528c47c4b
@ -279,6 +279,8 @@ println!("{}", x + y);
|
||||
|
||||
Here's an explanation, rendered:
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
First, we set `x` to five:
|
||||
|
||||
```rust
|
||||
@ -303,8 +305,12 @@ Finally, we print the sum of `x` and `y`:
|
||||
println!("{}", x + y);
|
||||
```
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
Here's the same explanation, in raw text:
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
> First, we set `x` to five:
|
||||
>
|
||||
> ```text
|
||||
@ -329,6 +335,8 @@ Here's the same explanation, in raw text:
|
||||
> println!("{}", x + y);
|
||||
> ```
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
By repeating all parts of the example, you can ensure that your example still
|
||||
compiles, while only showing the parts that are relevant to that part of your
|
||||
explanation.
|
||||
|
Loading…
Reference in New Issue
Block a user