File tree Expand file tree Collapse file tree 4 files changed +6
-5
lines changed Expand file tree Collapse file tree 4 files changed +6
-5
lines changed Original file line number Diff line number Diff line change 1
1
---
2
- refs/heads/master: b530ca103388c99e774868645758785d6ad6b9a9
2
+ refs/heads/master: d071f51cdc7c3492ae2bc4180ffbf13bcdb31439
3
3
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4
4
refs/heads/snap-stage3: 18e3db7392d2d0697b7e27d6d986139960144d85
5
5
refs/heads/try: 7b78b52e602bb3ea8174f9b2006bff3315f03ef9
Original file line number Diff line number Diff line change @@ -58,6 +58,7 @@ Several modules in `core` are clients of `rt`:
58
58
#[ deny( unused_imports) ] ;
59
59
#[ deny( unused_mut) ] ;
60
60
#[ deny( unused_variable) ] ;
61
+ #[ deny( unused_unsafe) ] ;
61
62
62
63
use cell:: Cell ;
63
64
use clone:: Clone ;
@@ -224,7 +225,7 @@ pub fn run(main: ~fn()) -> int {
224
225
225
226
let nthreads = match os:: getenv ( "RUST_THREADS" ) {
226
227
Some ( nstr) => FromStr :: from_str ( nstr) . get ( ) ,
227
- None => unsafe { util:: num_cpus ( ) }
228
+ None => util:: num_cpus ( )
228
229
} ;
229
230
230
231
// The shared list of sleeping schedulers. Schedulers wake each other
Original file line number Diff line number Diff line change @@ -74,7 +74,7 @@ pub fn run_in_mt_newsched_task(f: ~fn()) {
74
74
do run_in_bare_thread {
75
75
let nthreads = match os:: getenv ( "RUST_TEST_THREADS" ) {
76
76
Some ( nstr) => FromStr :: from_str ( nstr) . get ( ) ,
77
- None => unsafe {
77
+ None => {
78
78
// Using more threads than cores in test code
79
79
// to force the OS to preempt them frequently.
80
80
// Assuming that this help stress test concurrent types.
Original file line number Diff line number Diff line change @@ -160,14 +160,14 @@ mod test {
160
160
let mut timer2 = TimerWatcher :: new ( & mut loop_) ;
161
161
do timer2. start ( 10 , 0 ) |timer2, _| {
162
162
163
- unsafe { * count_ptr += 1 ; }
163
+ * count_ptr += 1 ;
164
164
165
165
timer2. close ( ||( ) ) ;
166
166
167
167
// Restart the original timer
168
168
let mut timer = timer;
169
169
do timer. start ( 1 , 0 ) |timer, _| {
170
- unsafe { * count_ptr += 1 ; }
170
+ * count_ptr += 1 ;
171
171
timer. close ( ||( ) ) ;
172
172
}
173
173
}
You can’t perform that action at this time.
0 commit comments