diff options
| author | Patrick Walton <pcwalton@mimiga.net> | 2013-12-11 17:04:50 -0800 |
|---|---|---|
| committer | Patrick Walton <pcwalton@mimiga.net> | 2013-12-15 10:41:15 -0800 |
| commit | a87786e3e993564b444763f99dae24cdcb44a791 (patch) | |
| tree | 266903ba1a444bc9a1d2220055d32910e7aa194f /src/libstd/local_data.rs | |
| parent | 8d52dfbace05c46754f4f6bb5a25f55906c9d7b0 (diff) | |
librustc: Remove identifiers named `box`, since it's about to become a keyword.
Diffstat (limited to 'src/libstd/local_data.rs')
| -rw-r--r-- | src/libstd/local_data.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/libstd/local_data.rs b/src/libstd/local_data.rs index c75e7dde251..87fe5ac6f22 100644 --- a/src/libstd/local_data.rs +++ b/src/libstd/local_data.rs @@ -157,13 +157,13 @@ pub fn pop<T: 'static>(key: Key<T>) -> Option<T> { // Move `data` into transmute to get out the memory that it // owns, we must free it manually later. - let (_vtable, box): (uint, ~T) = unsafe { + let (_vtable, alloc): (uint, ~T) = unsafe { cast::transmute(data) }; - // Now that we own `box`, we can just move out of it as we would - // with any other data. - return Some(*box); + // Now that we own `alloc`, we can just move out of it as we + // would with any other data. + return Some(*alloc); } _ => {} } @@ -254,8 +254,8 @@ fn get_with<T:'static, // compiler coercions to achieve a '&' pointer. unsafe { match *cast::transmute::<&TLSValue, &(uint, ~T)>(data){ - (_vtable, ref box) => { - let value: &T = *box; + (_vtable, ref alloc) => { + let value: &T = *alloc; ret = f(Some(value)); } } |
