Skip to content

Commit

Permalink
Minor formatting changes in cfg-sanitize.md
Browse files Browse the repository at this point in the history
  • Loading branch information
mibac138 committed Apr 23, 2020
1 parent 14b1552 commit c3b6cc7
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 c3b6cc7

Please sign in to comment.