Add tests for private items of cfg_accessible

This commit is contained in:
Urgau 2022-05-25 12:19:50 +02:00
parent c413250757
commit 83373675c8

View File

@ -0,0 +1,21 @@
// 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() {}