Skip to content

Commit 7035740

Browse files
committed
---
yaml --- r: 59707 b: refs/heads/snap-stage3 c: f4c88c7 h: refs/heads/master i: 59705: 67aaae9 59703: 80b8b52 v: v3
1 parent 078be33 commit 7035740

File tree

5 files changed

+7
-48
lines changed

5 files changed

+7
-48
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: c081ffbd1e845687202a975ea2e698b623e5722f
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: 6ef226d5d95ac2248178e85accc52d0161d76540
4+
refs/heads/snap-stage3: f4c88c7da0503d4eb1109599a51537f750667320
55
refs/heads/try: c50a9d5b664478e533ba1d1d353213d70c8ad589
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b

branches/snap-stage3/src/etc/vim/after/syntax/rust.vim

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,6 @@ syn match rustRightArrowHead contained ">" conceal cchar= 
1111
syn match rustRightArrowTail contained "-" conceal cchar=
1212
syn match rustNiceOperator "->" contains=rustRightArrowHead,rustRightArrowTail
1313

14-
syn match rustLeftRightArrowHead contained ">" conceal cchar= 
15-
syn match rustLeftRightArrowTail contained "<-" conceal cchar=
16-
syn match rustNiceOperator "<->" contains=rustLeftRightArrowHead,rustLeftRightArrowTail
17-
1814
syn match rustFatRightArrowHead contained ">" conceal cchar= 
1915
syn match rustFatRightArrowTail contained "=" conceal cchar=
2016
syn match rustNiceOperator "=>" contains=rustFatRightArrowHead,rustFatRightArrowTail

branches/snap-stage3/src/etc/vim/syntax/rust.vim

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ syn keyword rustOperator as
1515

1616
syn keyword rustKeyword break copy do drop extern
1717
syn keyword rustKeyword for if impl let log
18-
syn keyword rustKeyword copy do drop extern
18+
syn keyword rustKeyword copy do extern
1919
syn keyword rustKeyword for impl let log
2020
syn keyword rustKeyword loop mod once priv pub
2121
syn keyword rustKeyword return
@@ -28,8 +28,8 @@ syn keyword rustStorage const mut ref static
2828
syn match rustIdentifier contains=rustIdentifierPrime "\%([^[:cntrl:][:space:][:punct:][:digit:]]\|_\)\%([^[:cntrl:][:punct:][:space:]]\|_\)*" display contained
2929
syn match rustFuncName "\%([^[:cntrl:][:space:][:punct:][:digit:]]\|_\)\%([^[:cntrl:][:punct:][:space:]]\|_\)*" display contained
3030

31-
" Reserved words
32-
"syn keyword rustKeyword m32 m64 m128 f80 f16 f128 be " These are obsolete
31+
" reserved
32+
syn keyword rustKeyword be
3333

3434
syn keyword rustType int uint float char bool u8 u16 u32 u64 f32
3535
syn keyword rustType f64 i8 i16 i32 i64 str Self

branches/snap-stage3/src/libcore/os.rs

Lines changed: 1 addition & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -289,33 +289,6 @@ pub fn setenv(n: &str, v: &str) {
289289
}
290290
}
291291

292-
/// Remove a variable from the environment entirely
293-
pub fn unsetenv(n: &str) {
294-
#[cfg(unix)]
295-
fn _unsetenv(n: &str) {
296-
unsafe {
297-
do with_env_lock {
298-
do str::as_c_str(n) |nbuf| {
299-
libc::funcs::posix01::unistd::unsetenv(nbuf);
300-
}
301-
}
302-
}
303-
}
304-
#[cfg(windows)]
305-
fn _unsetenv(n: &str) {
306-
unsafe {
307-
do with_env_lock {
308-
use os::win32::as_utf16_p;
309-
do as_utf16_p(n) |nbuf| {
310-
libc::SetEnvironmentVariableW(nbuf, ptr::null());
311-
}
312-
}
313-
}
314-
}
315-
316-
_unsetenv(n);
317-
}
318-
319292
pub fn fdopen(fd: c_int) -> *FILE {
320293
unsafe {
321294
return do as_c_charp("r") |modebuf| {
@@ -1439,7 +1412,7 @@ mod tests {
14391412
use option::Some;
14401413
use option;
14411414
use os::{as_c_charp, env, getcwd, getenv, make_absolute, real_args};
1442-
use os::{remove_file, setenv, unsetenv};
1415+
use os::{remove_file, setenv};
14431416
use os;
14441417
use path::Path;
14451418
use rand::RngUtil;
@@ -1475,14 +1448,6 @@ mod tests {
14751448
assert!(getenv(n) == option::Some(~"VALUE"));
14761449
}
14771450
1478-
#[test]
1479-
fn test_unsetenv() {
1480-
let n = make_rand_name();
1481-
setenv(n, ~"VALUE");
1482-
unsetenv(n);
1483-
assert!(getenv(n) == option::None);
1484-
}
1485-
14861451
#[test]
14871452
#[ignore(cfg(windows))]
14881453
#[ignore]

branches/snap-stage3/src/libcore/task/local_data_priv.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,12 +94,10 @@ unsafe fn get_task_local_map(task: *rust_task) -> TaskLocalMap {
9494
let map_ptr = rt::rust_get_task_local_data(task);
9595
if map_ptr.is_null() {
9696
let map: TaskLocalMap = @mut ~[];
97+
// NB: This bumps the ref count before converting to an unsafe pointer,
98+
// keeping the map alive until TLS is destroyed
9799
rt::rust_set_task_local_data(task, cast::transmute(map));
98100
rt::rust_task_local_data_atexit(task, cleanup_task_local_map_extern_cb);
99-
// Also need to reference it an extra time to keep it for now.
100-
let nonmut = cast::transmute::<TaskLocalMap,
101-
@~[Option<TaskLocalElement>]>(map);
102-
cast::bump_box_refcount(nonmut);
103101
map
104102
} else {
105103
let map = cast::transmute(map_ptr);

0 commit comments

Comments
 (0)