@@ -46,7 +46,7 @@ struct binding_info {
46
46
type BindingMap = HashMap < Name , binding_info > ;
47
47
48
48
// Trait method resolution
49
- pub type TraitMap = HashMap < NodeId , @mut ~[ DefId ] > ;
49
+ pub type TraitMap = HashMap < NodeId , @RefCell < ~[ DefId ] > > ;
50
50
51
51
// This is the replacement export map. It maps a module to all of the exports
52
52
// within.
@@ -5244,14 +5244,14 @@ impl Resolver {
5244
5244
// the field name so that we can do some nice error reporting
5245
5245
// later on in typeck.
5246
5246
let traits = self . search_for_traits_containing_method ( ident) ;
5247
- self . trait_map . insert ( expr. id , @mut traits) ;
5247
+ self . trait_map . insert ( expr. id , @RefCell :: new ( traits) ) ;
5248
5248
}
5249
5249
ExprMethodCall ( _, _, ident, _, _, _) => {
5250
5250
debug ! ( "(recording candidate traits for expr) recording \
5251
5251
traits for {}",
5252
5252
expr. id) ;
5253
5253
let traits = self . search_for_traits_containing_method ( ident) ;
5254
- self . trait_map . insert ( expr. id , @mut traits) ;
5254
+ self . trait_map . insert ( expr. id , @RefCell :: new ( traits) ) ;
5255
5255
}
5256
5256
ExprBinary ( _, BiAdd , _, _) | ExprAssignOp ( _, BiAdd , _, _) => {
5257
5257
let i = self . lang_items . add_trait ( ) ;
@@ -5442,7 +5442,7 @@ impl Resolver {
5442
5442
trait_id : Option < DefId > ) {
5443
5443
match trait_id {
5444
5444
Some ( trait_id) => {
5445
- self . trait_map . insert ( expr_id, @mut ~[ trait_id] ) ;
5445
+ self . trait_map . insert ( expr_id, @RefCell :: new ( ~[ trait_id] ) ) ;
5446
5446
}
5447
5447
None => { }
5448
5448
}
0 commit comments