mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-03 04:04:06 +00:00
Rollup merge of #71637 - mibac138:cfg-sanitize, r=petrochenkov
Minor formatting changes in `cfg-sanitize.md`
This commit is contained in:
commit
3d1f958b6c
@ -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 {
|
||||
// ...
|
||||
}
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user