File tree Expand file tree Collapse file tree 3 files changed +46
-6
lines changed
src/test/ui/conditional-compilation Expand file tree Collapse file tree 3 files changed +46
-6
lines changed Original file line number Diff line number Diff line change 1+ // This test is a collection of test that should pass.
2+ //
3+ // check-fail
4+
5+ #![ feature( cfg_accessible) ]
6+ #![ feature( trait_alias) ]
7+
8+ enum Enum {
9+ Existing { existing : u8 } ,
10+ }
11+
12+ trait TraitAlias = std: : fmt:: Debug + Send ;
13+
14+ // FIXME: Currently returns `false` but should be "not sure"
15+ #[ cfg_accessible( Enum :: Existing :: existing) ]
16+ const A : bool = true ;
17+
18+ // FIXME: Currently returns `false` but should be "not sure"
19+ #[ cfg_accessible( Enum :: Existing :: unresolved) ]
20+ const B : bool = true ;
21+
22+ // FIXME: Currently shows "cannot determine" but should be `false`
23+ #[ cfg_accessible( unresolved) ] //~ ERROR cannot determine
24+ const C : bool = true ;
25+
26+ // FIXME: Currently shows "not sure" but should be `false`
27+ #[ cfg_accessible( TraitAlias :: unresolved) ] //~ ERROR not sure whether the path is accessible or not
28+ const D : bool = true ;
29+
30+ 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 {
3333 Existing { existing : u8 } ,
3434}
3535
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 ;
4236#[ cfg_accessible( Enum :: unresolved) ] //~ ERROR not sure
4337const C : bool = true ;
4438
You can’t perform that action at this time.
0 commit comments