rust/tests/ui/conditional-compilation/cfg_accessible-private.rs

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

22 lines
373 B
Rust
Raw Normal View History

// check-pass
#![feature(cfg_accessible)]
mod private {
struct Struct;
enum Enum{}
union Union{_a:u8}
}
#[cfg_accessible(private::Struct)]
const A: bool = true;
#[cfg_accessible(private::Enum)]
const A: bool = true;
#[cfg_accessible(private::Union)]
const A: bool = true;
const A: bool = false; // Will conflict if any of those is accessible
fn main() {}