mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-12-30 06:53:27 +00:00
30 lines
460 B
Rust
30 lines
460 B
Rust
// run-rustfix
|
|
|
|
#![warn(clippy::mismatched_target_os)]
|
|
#![allow(unused)]
|
|
|
|
#[cfg(cloudabi)]
|
|
fn cloudabi() {}
|
|
|
|
#[cfg(hermit)]
|
|
fn hermit() {}
|
|
|
|
#[cfg(wasi)]
|
|
fn wasi() {}
|
|
|
|
#[cfg(none)]
|
|
fn none() {}
|
|
|
|
// list with conditions
|
|
#[cfg(all(not(any(windows, cloudabi)), wasi))]
|
|
fn list() {}
|
|
|
|
// windows is a valid target family, should be ignored
|
|
#[cfg(windows)]
|
|
fn windows() {}
|
|
|
|
// correct use, should be ignored
|
|
#[cfg(target_os = "hermit")]
|
|
fn correct() {}
|
|
|
|
fn main() {}
|