librustc: De-@mut
resolve::Module::populated
This commit is contained in:
parent
a1ee3810b8
commit
d503fff28e
1 changed files with 5 additions and 5 deletions
|
@ -455,7 +455,7 @@ struct Module {
|
||||||
// Whether this module is populated. If not populated, any attempt to
|
// Whether this module is populated. If not populated, any attempt to
|
||||||
// access the children must be preceded with a
|
// access the children must be preceded with a
|
||||||
// `populate_module_if_necessary` call.
|
// `populate_module_if_necessary` call.
|
||||||
populated: bool,
|
populated: Cell<bool>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Module {
|
impl Module {
|
||||||
|
@ -477,7 +477,7 @@ impl Module {
|
||||||
import_resolutions: @mut HashMap::new(),
|
import_resolutions: @mut HashMap::new(),
|
||||||
glob_count: 0,
|
glob_count: 0,
|
||||||
resolved_import_count: 0,
|
resolved_import_count: 0,
|
||||||
populated: !external,
|
populated: Cell::new(!external),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1887,16 +1887,16 @@ impl Resolver {
|
||||||
child_ident,
|
child_ident,
|
||||||
visibility)
|
visibility)
|
||||||
});
|
});
|
||||||
module.populated = true
|
module.populated.set(true)
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Ensures that the reduced graph rooted at the given external module
|
/// Ensures that the reduced graph rooted at the given external module
|
||||||
/// is built, building it if it is not.
|
/// is built, building it if it is not.
|
||||||
fn populate_module_if_necessary(&mut self, module: @mut Module) {
|
fn populate_module_if_necessary(&mut self, module: @mut Module) {
|
||||||
if !module.populated {
|
if !module.populated.get() {
|
||||||
self.populate_external_module(module)
|
self.populate_external_module(module)
|
||||||
}
|
}
|
||||||
assert!(module.populated)
|
assert!(module.populated.get())
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Builds the reduced graph rooted at the 'use' directive for an external
|
/// Builds the reduced graph rooted at the 'use' directive for an external
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue