Skip to content

Commit a5e37ab

Browse files
committed
---
yaml --- r: 66227 b: refs/heads/master c: d071f51 h: refs/heads/master i: 66225: f899a53 66223: 1dca157 v: v3
1 parent 72933ae commit a5e37ab

File tree

4 files changed

+6
-5
lines changed

4 files changed

+6
-5
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: b530ca103388c99e774868645758785d6ad6b9a9
2+
refs/heads/master: d071f51cdc7c3492ae2bc4180ffbf13bcdb31439
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 18e3db7392d2d0697b7e27d6d986139960144d85
55
refs/heads/try: 7b78b52e602bb3ea8174f9b2006bff3315f03ef9

trunk/src/libstd/rt/mod.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ Several modules in `core` are clients of `rt`:
5858
#[deny(unused_imports)];
5959
#[deny(unused_mut)];
6060
#[deny(unused_variable)];
61+
#[deny(unused_unsafe)];
6162

6263
use cell::Cell;
6364
use clone::Clone;
@@ -224,7 +225,7 @@ pub fn run(main: ~fn()) -> int {
224225

225226
let nthreads = match os::getenv("RUST_THREADS") {
226227
Some(nstr) => FromStr::from_str(nstr).get(),
227-
None => unsafe { util::num_cpus() }
228+
None => util::num_cpus()
228229
};
229230

230231
// The shared list of sleeping schedulers. Schedulers wake each other

trunk/src/libstd/rt/test.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ pub fn run_in_mt_newsched_task(f: ~fn()) {
7474
do run_in_bare_thread {
7575
let nthreads = match os::getenv("RUST_TEST_THREADS") {
7676
Some(nstr) => FromStr::from_str(nstr).get(),
77-
None => unsafe {
77+
None => {
7878
// Using more threads than cores in test code
7979
// to force the OS to preempt them frequently.
8080
// Assuming that this help stress test concurrent types.

trunk/src/libstd/rt/uv/timer.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,14 +160,14 @@ mod test {
160160
let mut timer2 = TimerWatcher::new(&mut loop_);
161161
do timer2.start(10, 0) |timer2, _| {
162162

163-
unsafe { *count_ptr += 1; }
163+
*count_ptr += 1;
164164

165165
timer2.close(||());
166166

167167
// Restart the original timer
168168
let mut timer = timer;
169169
do timer.start(1, 0) |timer, _| {
170-
unsafe { *count_ptr += 1; }
170+
*count_ptr += 1;
171171
timer.close(||());
172172
}
173173
}

0 commit comments

Comments
 (0)