File tree Expand file tree Collapse file tree 3 files changed +47
-6
lines changed
src/test/ui/conditional-compilation Expand file tree Collapse file tree 3 files changed +47
-6
lines changed Original file line number Diff line number Diff line change
1
+ // check-fail
2
+ // known-bug
3
+
4
+ // This should pass.
5
+
6
+ #![ feature( cfg_accessible) ]
7
+ #![ feature( trait_alias) ]
8
+
9
+ enum Enum {
10
+ Existing { existing : u8 } ,
11
+ }
12
+
13
+ trait TraitAlias = std: : fmt:: Debug + Send ;
14
+
15
+ // FIXME: Currently returns `false` but should be "not sure"
16
+ #[ cfg_accessible( Enum :: Existing :: existing) ]
17
+ const A : bool = true ;
18
+
19
+ // FIXME: Currently returns `false` but should be "not sure"
20
+ #[ cfg_accessible( Enum :: Existing :: unresolved) ]
21
+ const B : bool = true ;
22
+
23
+ // FIXME: Currently shows "cannot determine" but should be `false`
24
+ #[ cfg_accessible( unresolved) ]
25
+ const C : bool = true ;
26
+
27
+ // FIXME: Currently shows "not sure" but should be `false`
28
+ #[ cfg_accessible( TraitAlias :: unresolved) ]
29
+ const D : bool = true ;
30
+
31
+ fn main ( ) { }
Original file line number Diff line number Diff line change
1
+ error: not sure whether the path is accessible or not
2
+ --> $DIR/cfg_accessible-bugs.rs:28:18
3
+ |
4
+ LL | #[cfg_accessible(TraitAlias::unresolved)]
5
+ | ^^^^^^^^^^^^^^^^^^^^^^
6
+ |
7
+ = note: the type may have associated items, but we are currently not checking them
8
+
9
+ error: cannot determine whether the path is accessible or not
10
+ --> $DIR/cfg_accessible-bugs.rs:24:1
11
+ |
12
+ LL | #[cfg_accessible(unresolved)]
13
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
14
+
15
+ error: aborting due to 2 previous errors
16
+
Original file line number Diff line number Diff line change @@ -33,12 +33,6 @@ enum Enum {
33
33
Existing { existing : u8 } ,
34
34
}
35
35
36
- // FIXME: Currently returns `false` but should be "not sure"
37
- #[ cfg_accessible( Enum :: Existing :: existing) ]
38
- const A : bool = true ;
39
- // FIXME: Currently returns `false` but should be "not sure"
40
- #[ cfg_accessible( Enum :: Existing :: unresolved) ]
41
- const B : bool = true ;
42
36
#[ cfg_accessible( Enum :: unresolved) ] //~ ERROR not sure
43
37
const C : bool = true ;
44
38
You can’t perform that action at this time.
0 commit comments