rust/tests/ui/check-cfg/cargo-feature.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

15 lines
396 B
Rust
Raw Normal View History

// This test checks that when no features are passed by Cargo we
// suggest adding some in the Cargo.toml instead of vomitting a
// list of all the expected names
//
// check-pass
// rustc-env:CARGO=/usr/bin/cargo
// compile-flags: --check-cfg=cfg() -Z unstable-options
// error-pattern:Cargo.toml
#[cfg(feature = "serde")]
//~^ WARNING unexpected `cfg` condition name
fn ser() {}
fn main() {}