Skip to content

Commit 8337367

Browse files
committed
Add tests for private items of cfg_accessible
1 parent c413250 commit 8337367

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
// check-pass
2+
3+
#![feature(cfg_accessible)]
4+
5+
mod private {
6+
struct Struct;
7+
enum Enum{}
8+
union Union{_a:u8}
9+
}
10+
11+
#[cfg_accessible(private::Struct)]
12+
const A: bool = true;
13+
14+
#[cfg_accessible(private::Enum)]
15+
const A: bool = true;
16+
17+
#[cfg_accessible(private::Union)]
18+
const A: bool = true;
19+
20+
const A: bool = false; // Will conflict if any of those is accessible
21+
fn main() {}

0 commit comments

Comments
 (0)