File tree Expand file tree Collapse file tree 2 files changed +68
-2
lines changed Expand file tree Collapse file tree 2 files changed +68
-2
lines changed Original file line number Diff line number Diff line change 1
1
---
2
- refs/heads/master: 7fd04a21a1f335cf5fb335e33f6e84d4d29fbef1
2
+ refs/heads/master: 6346a67cbd96f0c1faf483851e1f120334862309
Original file line number Diff line number Diff line change 1
1
// xfail-stage0
2
2
3
+ #[ cfg( bogus) ]
4
+ const bool b = false ;
5
+
6
+ const bool b = true ;
7
+
8
+ #[ cfg( bogus) ]
9
+ native "rust" mod rustrt {
10
+ // This symbol doesn't exist and would be a link error if this
11
+ // module was translated
12
+ fn bogus ( ) ;
13
+ }
14
+
15
+ native "rust" mod rustrt {
16
+ }
17
+
18
+ #[ cfg( bogus) ]
19
+ type t = int ;
20
+
21
+ type t = bool ;
22
+
23
+ #[ cfg( bogus) ]
24
+ tag tg {
25
+ foo;
26
+ }
27
+
28
+ tag tg {
29
+ bar;
30
+ }
31
+
32
+ #[ cfg( bogus) ]
33
+ obj o( ) {
34
+ fn f ( ) { ret bogus; }
35
+ }
36
+
37
+ obj o( ) {
38
+ }
39
+
40
+ #[ cfg( bogus) ]
41
+ resource r( int i) { }
42
+
43
+ resource r( int i) { }
44
+
45
+ #[ cfg( bogus) ]
46
+ mod m {
47
+ // This needs to parse but would fail in typeck. Since it's not in
48
+ // the current config it should not be typechecked.
49
+ fn bogus ( ) { ret 0 ; }
50
+ }
51
+
52
+ mod m {
53
+
54
+ // Submodules have slightly different code paths than the top-level
55
+ // module, so let's make sure this jazz works here as well
56
+ #[ cfg( bogus) ]
57
+ fn f ( ) { }
58
+
59
+ fn f ( ) { }
60
+ }
61
+
3
62
// Since the bogus configuration isn't defined main will just be
4
63
// parsed, but nothing further will be done with it
5
64
#[ cfg( bogus) ]
6
65
fn main ( ) { fail }
7
66
8
- fn main ( ) { }
67
+ fn main ( ) {
68
+ // Exercise some of the configured items in ways that wouldn't be possible
69
+ // if they had the bogus definition
70
+ assert b;
71
+ let t x = true ;
72
+ let tg y = bar;
73
+ }
74
+
You can’t perform that action at this time.
0 commit comments