@@ -56,7 +56,7 @@ use syntax::visit::{visit_mod};
5656use util:: ppaux:: ty_to_str;
5757
5858use core:: result:: Ok ;
59- use core:: hashmap:: linear:: LinearSet ;
59+ use core:: hashmap:: linear:: { LinearMap , LinearSet } ;
6060use core:: uint;
6161use std:: oldmap:: HashMap ;
6262
@@ -142,18 +142,17 @@ pub fn method_to_MethodInfo(ast_method: @method) -> @MethodInfo {
142142pub struct CoherenceInfo {
143143 // Contains implementations of methods that are inherent to a type.
144144 // Methods in these implementations don't need to be exported.
145- inherent_methods: HashMap <def_id,@mut ~[@Impl]>,
145+ inherent_methods: @mut LinearMap <def_id, @mut ~[@Impl]>,
146146
147147 // Contains implementations of methods associated with a trait. For these,
148148 // the associated trait must be imported at the call site.
149- extension_methods: HashMap<def_id,@mut ~[@Impl]>,
150-
149+ extension_methods: @mut LinearMap<def_id, @mut ~[@Impl]>,
151150}
152151
153152pub fn CoherenceInfo() -> CoherenceInfo {
154153 CoherenceInfo {
155- inherent_methods: HashMap (),
156- extension_methods: HashMap (),
154+ inherent_methods: @mut LinearMap::new (),
155+ extension_methods: @mut LinearMap::new (),
157156 }
158157}
159158
@@ -380,7 +379,7 @@ pub impl CoherenceChecker {
380379 . insert ( base_def_id, implementation_list) ;
381380 }
382381 Some ( existing_implementation_list) => {
383- implementation_list = existing_implementation_list;
382+ implementation_list = * existing_implementation_list;
384383 }
385384 }
386385
@@ -397,7 +396,7 @@ pub impl CoherenceChecker {
397396 . insert ( trait_id, implementation_list) ;
398397 }
399398 Some ( existing_implementation_list) => {
400- implementation_list = existing_implementation_list;
399+ implementation_list = * existing_implementation_list;
401400 }
402401 }
403402
@@ -472,7 +471,7 @@ pub impl CoherenceChecker {
472471
473472 match extension_methods. find( & trait_def_id) {
474473 Some ( impls) => {
475- let impls: & mut ~[ @Impl ] = impls;
474+ let impls: & mut ~[ @Impl ] = * impls;
476475 for uint:: range( 0 , impls. len( ) ) |i| {
477476 f( impls[ i] ) ;
478477 }
0 commit comments