@@ -358,7 +358,7 @@ struct ImportResolution {
358
358
value_target : RefCell < Option < Target > > ,
359
359
/// The source node of the `use` directive leading to the value target
360
360
/// being non-none
361
- value_id : NodeId ,
361
+ value_id : Cell < NodeId > ,
362
362
363
363
/// The type that this `use` directive names, if there is one.
364
364
type_target : Option < Target > ,
@@ -371,7 +371,7 @@ impl ImportResolution {
371
371
fn new ( id : NodeId , is_public : bool ) -> ImportResolution {
372
372
ImportResolution {
373
373
type_id : id,
374
- value_id : id ,
374
+ value_id : Cell :: new ( id ) ,
375
375
outstanding_references : Cell :: new ( 0 ) ,
376
376
value_target : RefCell :: new ( None ) ,
377
377
type_target : None ,
@@ -390,7 +390,7 @@ impl ImportResolution {
390
390
fn id ( & self , namespace : Namespace ) -> NodeId {
391
391
match namespace {
392
392
TypeNS => self . type_id ,
393
- ValueNS => self . value_id ,
393
+ ValueNS => self . value_id . get ( ) ,
394
394
}
395
395
}
396
396
}
@@ -1974,7 +1974,7 @@ impl Resolver {
1974
1974
1975
1975
// the source of this name is different now
1976
1976
resolution. type_id = id;
1977
- resolution. value_id = id ;
1977
+ resolution. value_id . set ( id ) ;
1978
1978
}
1979
1979
None => {
1980
1980
debug ! ( "(building import directive) creating new" ) ;
@@ -2421,7 +2421,7 @@ impl Resolver {
2421
2421
debug ! ( "(resolving single import) found value target" ) ;
2422
2422
import_resolution. value_target . set (
2423
2423
Some ( Target :: new ( target_module, name_bindings) ) ) ;
2424
- import_resolution. value_id = directive. id ;
2424
+ import_resolution. value_id . set ( directive. id ) ;
2425
2425
used_public = name_bindings. defined_in_public_namespace ( ValueNS ) ;
2426
2426
}
2427
2427
UnboundResult => { /* Continue. */ }
@@ -2598,7 +2598,7 @@ impl Resolver {
2598
2598
debug ! ( "(resolving glob import) ... for value target" ) ;
2599
2599
dest_import_resolution. value_target . set (
2600
2600
Some ( Target :: new ( containing_module, name_bindings) ) ) ;
2601
- dest_import_resolution. value_id = id ;
2601
+ dest_import_resolution. value_id . set ( id ) ;
2602
2602
}
2603
2603
if name_bindings. defined_in_public_namespace ( TypeNS ) {
2604
2604
debug ! ( "(resolving glob import) ... for type target" ) ;
0 commit comments