Minor formatting changes in cfg-sanitize.md

This commit is contained in:
mibac138 2020-04-20 14:39:19 +02:00
parent 14b15521c5
commit c3b6cc76d4

View file

@ -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 {
// ...
}
}
```