From 9d51d6bc30cbea2bec56c1a2ba351a91ced9dcb0 Mon Sep 17 00:00:00 2001 From: Oliver Schneider Date: Wed, 10 May 2017 13:58:41 +0200 Subject: [PATCH] Fix tidy issues --- src/librustc_resolve/build_reduced_graph.rs | 6 ++++-- src/librustc_resolve/lib.rs | 14 +++++++++++--- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/src/librustc_resolve/build_reduced_graph.rs b/src/librustc_resolve/build_reduced_graph.rs index d1f0cdedde8..9d774b96325 100644 --- a/src/librustc_resolve/build_reduced_graph.rs +++ b/src/librustc_resolve/build_reduced_graph.rs @@ -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. } diff --git a/src/librustc_resolve/lib.rs b/src/librustc_resolve/lib.rs index fd964c7d7d1..57d04bee92b 100644 --- a/src/librustc_resolve/lib.rs +++ b/src/librustc_resolve/lib.rs @@ -873,7 +873,10 @@ pub struct ModuleData<'a> { pub type Module<'a> = &'a ModuleData<'a>; impl<'a> ModuleData<'a> { - fn new(parent: Option>, kind: ModuleKind, normal_ancestor_id: DefId, span: Span) -> Self { + fn new(parent: Option>, + 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)) }