rust/tests/ui/cfg/cfg_false_no_std-2.rs
Vadim Petrochenkov 46becfdf9c expand: Change how #![cfg(FALSE)] behaves on crate root
Previously it removed all other attributes from the crate root.
Now it removes only attributes below itself.

So it becomes possible to configure some global crate properties even for fully unconfigured crates.
2023-06-10 00:35:21 +03:00

12 lines
304 B
Rust

// Error, the linked empty library is `no_std` and doesn't provide a panic handler.
// dont-check-compiler-stderr
// error-pattern: `#[panic_handler]` function required, but not found
// aux-build: cfg_false_lib_no_std_before.rs
#![no_std]
extern crate cfg_false_lib_no_std_before as _;
fn main() {}