File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change 14
14
#![ allow( unknown_features) ]
15
15
#![ feature( box_syntax) ]
16
16
17
- static mut value: uint = 0 ;
17
+ mod s {
18
+ // FIXME(22181,22462) workaround hygiene issues between box
19
+ // desugaring, macro-hygiene (or lack thereof) and static bindings
20
+ // by forcing the static binding `value` into its own module.
21
+
22
+ pub static mut value: uint = 0 ;
23
+ }
18
24
19
25
struct Cat {
20
26
name : uint ,
@@ -30,7 +36,7 @@ impl Dummy for Cat {
30
36
31
37
impl Drop for Cat {
32
38
fn drop ( & mut self ) {
33
- unsafe { value = self . name ; }
39
+ unsafe { s :: value = self . name ; }
34
40
}
35
41
}
36
42
@@ -40,6 +46,6 @@ pub fn main() {
40
46
let nyan: Box < Dummy > = x as Box < Dummy > ;
41
47
}
42
48
unsafe {
43
- assert_eq ! ( value, 22 ) ;
49
+ assert_eq ! ( s :: value, 22 ) ;
44
50
}
45
51
}
You can’t perform that action at this time.
0 commit comments