Rollup merge of #71637 - mibac138:cfg-sanitize, r=petrochenkov

Minor formatting changes in `cfg-sanitize.md`
This commit is contained in:
Dylan DPC 2020-04-28 17:55:48 +02:00 committed by GitHub
commit 3d1f958b6c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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