rust/tests/ui/cfg/future-compat-crate-attributes-using-cfg_attr.rs

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

16 lines
406 B
Rust
Raw Normal View History

//@ check-fail
//@ compile-flags:--cfg foo
#![cfg_attr(foo, crate_type="bin")]
//~^ERROR `crate_type` within
//~| WARN this was previously accepted
//~|ERROR `crate_type` within
//~| WARN this was previously accepted
#![cfg_attr(foo, crate_name="bar")]
//~^ERROR `crate_name` within
//~| WARN this was previously accepted
//~|ERROR `crate_name` within
//~| WARN this was previously accepted
fn main() {}