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 1414#![ allow( unknown_features) ]
1515#![ feature( box_syntax) ]
1616
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+ }
1824
1925struct Cat {
2026 name : uint ,
@@ -30,7 +36,7 @@ impl Dummy for Cat {
3036
3137impl Drop for Cat {
3238 fn drop ( & mut self ) {
33- unsafe { value = self . name ; }
39+ unsafe { s :: value = self . name ; }
3440 }
3541}
3642
@@ -40,6 +46,6 @@ pub fn main() {
4046 let nyan: Box < Dummy > = x as Box < Dummy > ;
4147 }
4248 unsafe {
43- assert_eq ! ( value, 22 ) ;
49+ assert_eq ! ( s :: value, 22 ) ;
4450 }
4551}
You can’t perform that action at this time.
0 commit comments