blob: 07b0be5b1ae2606e37576b693db30c9ad125f09a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
#![feature(cfg_accessible)]
mod m {
pub struct ExistingPublic;
struct ExistingPrivate;
}
#[cfg_accessible(m::ExistingPublic)]
struct ExistingPublic;
// FIXME: Not implemented yet.
#[cfg_accessible(m::ExistingPrivate)] //~ ERROR not sure whether the path is accessible or not
struct ExistingPrivate;
// FIXME: Not implemented yet.
#[cfg_accessible(m::NonExistent)] //~ ERROR not sure whether the path is accessible or not
struct ExistingPrivate;
#[cfg_accessible(n::AccessibleExpanded)] // OK, `cfg_accessible` can wait and retry.
struct AccessibleExpanded;
macro_rules! generate_accessible_expanded {
() => {
mod n {
pub struct AccessibleExpanded;
}
};
}
generate_accessible_expanded!();
struct S {
field: u8,
}
// FIXME: Not implemented yet.
#[cfg_accessible(S::field)] //~ ERROR not sure whether the path is accessible or not
struct Field;
fn main() {
ExistingPublic;
AccessibleExpanded;
}
|