Skip to content

Commit

Permalink
Rollup merge of rust-lang#71637 - mibac138:cfg-sanitize, r=petrochenkov
Browse files Browse the repository at this point in the history
Minor formatting changes in `cfg-sanitize.md`
  • Loading branch information
Dylan-DPC authored Apr 28, 2020
2 parents 0bcdd5f + c3b6cc7 commit 3d1f958
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions src/doc/unstable-book/src/language-features/cfg-sanitize.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,26 +11,24 @@ depending on whether a particular sanitizer is enabled or not.

## Examples

``` rust
```rust
#![feature(cfg_sanitize)]

#[cfg(sanitize = "thread")]
fn a() {
// ...
// ...
}

#[cfg(not(sanitize = "thread"))]
fn a() {
// ...
// ...
}

fn b() {
if cfg!(sanitize = "leak") {
// ...
} else {
// ...
}
if cfg!(sanitize = "leak") {
// ...
} else {
// ...
}
}

```

0 comments on commit 3d1f958

Please sign in to comment.