]>
git.proxmox.com Git - rustc.git/blob - src/test/ui/sanitize/cfg.rs
1 // Verifies that when compiling with -Zsanitizer=option,
2 // the `#[cfg(sanitize = "option")]` attribute is configured.
4 // needs-sanitizer-support
5 // needs-sanitizer-address
6 // needs-sanitizer-leak
7 // needs-sanitizer-memory
8 // needs-sanitizer-thread
10 // revisions: address leak memory thread
11 //[address]compile-flags: -Zsanitizer=address --cfg address
12 //[leak]compile-flags: -Zsanitizer=leak --cfg leak
13 //[memory]compile-flags: -Zsanitizer=memory --cfg memory
14 //[thread]compile-flags: -Zsanitizer=thread --cfg thread
16 #![feature(cfg_sanitize)]
18 #[cfg(all(sanitize = "address", address))]
21 #[cfg(all(sanitize = "leak", leak))]
24 #[cfg(all(sanitize = "memory", memory))]
27 #[cfg(all(sanitize = "thread", thread))]