Fix tidy issues

This commit is contained in:
Oliver Schneider 2017-05-10 13:58:41 +02:00
parent e2f781c7ea
commit 9d51d6bc30
2 changed files with 15 additions and 5 deletions

View File

@ -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.
}

View File

@ -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))
}