File tree Expand file tree Collapse file tree 6 files changed +14
-21
lines changed Expand file tree Collapse file tree 6 files changed +14
-21
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
7
7
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8
8
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c
9
9
refs/heads/incoming: 44d4d6de762f3f9aae1fedcf454c66b79b3ad58d
10
- refs/heads/dist-snap: e31ebeadc1ad0e38cc726e6b4a6c990498c5e10b
10
+ refs/heads/dist-snap: 342cb602db589f43c4e27a8c674164e641e833bd
11
11
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
12
12
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
13
13
refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0
Original file line number Diff line number Diff line change @@ -44,7 +44,7 @@ use io;
44
44
use libc:: { size_t, uintptr_t} ;
45
45
use option:: { None , Option , Some } ;
46
46
use ptr;
47
- use send_map:: linear:: LinearMap ;
47
+ use send_map:: linear:: LinearSet ;
48
48
use stackwalk;
49
49
use sys;
50
50
@@ -294,12 +294,6 @@ pub fn gc() {
294
294
}
295
295
}
296
296
297
- type RootSet = LinearMap < * Word , ( ) > ;
298
-
299
- fn RootSet ( ) -> RootSet {
300
- LinearMap( )
301
- }
302
-
303
297
#[ cfg( gc) ]
304
298
fn expect_sentinel( ) -> bool { true }
305
299
@@ -337,13 +331,13 @@ pub fn cleanup_stack_for_failure() {
337
331
ptr:: null ( )
338
332
} ;
339
333
340
- let mut roots = ~ RootSet ( ) ;
334
+ let mut roots = LinearSet :: new ( ) ;
341
335
for walk_gc_roots( need_cleanup, sentinel) |root, tydesc| {
342
336
// Track roots to avoid double frees.
343
- if roots. find ( & * root) . is_some ( ) {
337
+ if roots. contains ( & * root) {
344
338
loop ;
345
339
}
346
- roots. insert ( * root, ( ) ) ;
340
+ roots. insert ( * root) ;
347
341
348
342
if ptr:: is_null ( tydesc) {
349
343
// FIXME #4420: Destroy this box
Original file line number Diff line number Diff line change @@ -485,7 +485,7 @@ pub mod linear {
485
485
fn remove ( & mut self , value : & T ) -> bool { self . map . remove ( value) }
486
486
}
487
487
488
- impl < T : Hash IterBytes Eq > LinearSet < T > {
488
+ pub impl < T : Hash IterBytes Eq > LinearSet < T > {
489
489
/// Create an empty LinearSet
490
490
static fn new( ) -> LinearSet <T > { LinearSet { map: LinearMap ( ) } }
491
491
}
Original file line number Diff line number Diff line change @@ -96,21 +96,21 @@ macro_rules! move_it (
96
96
{ $x: expr } => ( unsafe { let y = move * ptr:: addr_of( & ( $x) ) ; move y } )
97
97
)
98
98
99
- type TaskSet = send_map:: linear:: LinearMap < * rust_task , ( ) > ;
99
+ type TaskSet = send_map:: linear:: LinearSet < * rust_task > ;
100
100
101
101
fn new_taskset ( ) -> TaskSet {
102
- send_map:: linear:: LinearMap ( )
102
+ send_map:: linear:: LinearSet :: new ( )
103
103
}
104
104
fn taskset_insert ( tasks : & mut TaskSet , task : * rust_task ) {
105
- let didnt_overwrite = tasks. insert ( task, ( ) ) ;
105
+ let didnt_overwrite = tasks. insert ( task) ;
106
106
assert didnt_overwrite;
107
107
}
108
108
fn taskset_remove ( tasks : & mut TaskSet , task : * rust_task ) {
109
109
let was_present = tasks. remove ( & task) ;
110
110
assert was_present;
111
111
}
112
112
pub fn taskset_each ( tasks : & TaskSet , blk : fn ( v : * rust_task ) -> bool ) {
113
- tasks. each_key ( |k| blk ( * k) )
113
+ tasks. each ( |k| blk ( * k) )
114
114
}
115
115
116
116
// One of these per group of linked-failure tasks.
Original file line number Diff line number Diff line change @@ -693,18 +693,18 @@ impl CoherenceChecker {
693
693
694
694
let tcx = self.crate_context.tcx;
695
695
696
- let mut provided_names = send_map::linear::LinearMap ();
696
+ let mut provided_names = send_map::linear::LinearSet::new ();
697
697
// Implemented methods
698
698
for uint::range(0, all_methods.len()) |i| {
699
- provided_names.insert(all_methods[i].ident, () );
699
+ provided_names.insert(all_methods[i].ident);
700
700
}
701
701
// Default methods
702
702
for ty::provided_trait_methods(tcx, trait_did).each |ident| {
703
- provided_names.insert(*ident, () );
703
+ provided_names.insert(*ident);
704
704
}
705
705
706
706
for (*ty::trait_methods(tcx, trait_did)).each |method| {
707
- if provided_names.contains_key (&method.ident) { loop; }
707
+ if provided_names.contains (&method.ident) { loop; }
708
708
709
709
tcx.sess.span_err(trait_ref_span,
710
710
fmt!(" missing method `%s`",
Original file line number Diff line number Diff line change @@ -1025,7 +1025,6 @@ mod tests {
1025
1025
}
1026
1026
1027
1027
#[ test]
1028
- #[ ignore( reason = "randomred" ) ]
1029
1028
fn test_strptime ( ) {
1030
1029
os:: setenv ( ~"TZ ", ~"America /Los_Angeles ") ;
1031
1030
tzset ( ) ;
You can’t perform that action at this time.
0 commit comments