Fix tidy issues
This commit is contained in:
parent
e2f781c7ea
commit
9d51d6bc30
@ -424,8 +424,10 @@ impl<'a> Resolver<'a> {
|
||||
fn build_reduced_graph_for_block(&mut self, block: &Block) {
|
||||
let parent = self.current_module;
|
||||
if self.block_needs_anonymous_module(block) {
|
||||
let module =
|
||||
self.new_module(parent, ModuleKind::Block(block.id), parent.normal_ancestor_id, block.span);
|
||||
let module = self.new_module(parent,
|
||||
ModuleKind::Block(block.id),
|
||||
parent.normal_ancestor_id,
|
||||
block.span);
|
||||
self.block_map.insert(block.id, module);
|
||||
self.current_module = module; // Descend into the block.
|
||||
}
|
||||
|
@ -873,7 +873,10 @@ pub struct ModuleData<'a> {
|
||||
pub type Module<'a> = &'a ModuleData<'a>;
|
||||
|
||||
impl<'a> ModuleData<'a> {
|
||||
fn new(parent: Option<Module<'a>>, kind: ModuleKind, normal_ancestor_id: DefId, span: Span) -> Self {
|
||||
fn new(parent: Option<Module<'a>>,
|
||||
kind: ModuleKind,
|
||||
normal_ancestor_id: DefId,
|
||||
span: Span) -> Self {
|
||||
ModuleData {
|
||||
parent: parent,
|
||||
kind: kind,
|
||||
@ -1434,8 +1437,13 @@ impl<'a> Resolver<'a> {
|
||||
self.crate_loader.postprocess(krate);
|
||||
}
|
||||
|
||||
fn new_module(&self, parent: Module<'a>, kind: ModuleKind, normal_ancestor_id: DefId, span: Span)
|
||||
-> Module<'a> {
|
||||
fn new_module(
|
||||
&self,
|
||||
parent: Module<'a>,
|
||||
kind: ModuleKind,
|
||||
normal_ancestor_id: DefId,
|
||||
span: Span,
|
||||
) -> Module<'a> {
|
||||
self.arenas.alloc_module(ModuleData::new(Some(parent), kind, normal_ancestor_id, span))
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user