trybuild/
rustflags.rs

1
2
3
4
5
6
7
8
9
10
11
12
const IGNORED_LINTS: &[&str] = &["dead_code"];

pub(crate) fn toml() -> toml::Value {
    let mut rustflags = vec!["--cfg", "trybuild", "--verbose"];

    for &lint in IGNORED_LINTS {
        rustflags.push("-A");
        rustflags.push(lint);
    }

    toml::Value::try_from(rustflags).unwrap()
}