about summary refs log tree commit diff
path: root/src/test/incremental/thinlto
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2020-01-30 23:24:53 +0000
committerbors <bors@rust-lang.org>2020-01-30 23:24:53 +0000
commit8e9089e454b04b8bad5ed6678050f1cc290a74b3 (patch)
treef11b96717422e2545019cf147597f0232654a0e2 /src/test/incremental/thinlto
parentbbef531518a3b4977a9c1f40808f950514b400fc (diff)
parent1f600f3f9a815efaf8c627d0a9af4eb836ffa7a2 (diff)
downloadrust-8e9089e454b04b8bad5ed6678050f1cc290a74b3.tar.gz
rust-8e9089e454b04b8bad5ed6678050f1cc290a74b3.zip
Auto merge of #5110 - Aloso:patch-1, r=flip1995
Fix syntax highlighting of code fences

The documentation for RESULT_EXPECT_USED includes this code:

    let res: Result<usize, ()> = Ok(1);
    res?;
    # Ok::<(), ()>(())

Because the code fence didn't start with `rust`, the code wasn't highlighted and the line starting with `#` was displayed on the website. This is now fixed.

EDIT: I noticed that highlighting for some other lints is broken as well. It only works if the code fence looks like this:

````markdown
```rust
// ..
```
````

However, many code blocks were ignored. I un-ignored most code blocks and made them compile by adding hidden code with `#`. While doing so, I found two mistakes:

```rust
opt.map_or(None, |a| a + 1)
// instead of
opt.map_or(None, |a| Some(a + 1))
```
and

```rust
fn as_str(self) -> &str
// instead of
fn as_str(self) -> &'static str
```

changelog: none
Diffstat (limited to 'src/test/incremental/thinlto')
0 files changed, 0 insertions, 0 deletions