about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/librustc_resolve/build_reduced_graph.rs35
-rw-r--r--src/librustc_resolve/macros.rs16
2 files changed, 28 insertions, 23 deletions
diff --git a/src/librustc_resolve/build_reduced_graph.rs b/src/librustc_resolve/build_reduced_graph.rs
index 6816789cf28..627c72ff8c9 100644
--- a/src/librustc_resolve/build_reduced_graph.rs
+++ b/src/librustc_resolve/build_reduced_graph.rs
@@ -362,9 +362,11 @@ impl<'b> Resolver<'b> {
 
     // Constructs the reduced graph for one variant. Variants exist in the
     // type and value namespaces.
-    fn build_reduced_graph_for_variant(
-        &mut self, variant: &Variant, parent: Module<'b>, vis: ty::Visibility, expansion: Mark,
-    ) {
+    fn build_reduced_graph_for_variant(&mut self,
+                                       variant: &Variant,
+                                       parent: Module<'b>,
+                                       vis: ty::Visibility,
+                                       expansion: Mark) {
         let name = variant.node.name.name;
         let def_id = self.definitions.local_def_id(variant.node.data.id());
 
@@ -381,22 +383,20 @@ impl<'b> Resolver<'b> {
     }
 
     /// Constructs the reduced graph for one foreign item.
-    fn build_reduced_graph_for_foreign_item(
-        &mut self, foreign_item: &ForeignItem, expansion: Mark,
-    ) {
+    fn build_reduced_graph_for_foreign_item(&mut self, item: &ForeignItem, expansion: Mark) {
         let parent = self.current_module;
-        let name = foreign_item.ident.name;
+        let name = item.ident.name;
 
-        let def = match foreign_item.node {
+        let def = match item.node {
             ForeignItemKind::Fn(..) => {
-                Def::Fn(self.definitions.local_def_id(foreign_item.id))
+                Def::Fn(self.definitions.local_def_id(item.id))
             }
             ForeignItemKind::Static(_, m) => {
-                Def::Static(self.definitions.local_def_id(foreign_item.id), m)
+                Def::Static(self.definitions.local_def_id(item.id), m)
             }
         };
-        let vis = self.resolve_visibility(&foreign_item.vis);
-        self.define(parent, name, ValueNS, (def, vis, foreign_item.span, expansion));
+        let vis = self.resolve_visibility(&item.vis);
+        self.define(parent, name, ValueNS, (def, vis, item.span, expansion));
     }
 
     fn build_reduced_graph_for_block(&mut self, block: &Block) {
@@ -415,8 +415,7 @@ impl<'b> Resolver<'b> {
     }
 
     /// Builds the reduced graph for a single item in an external crate.
-    fn build_reduced_graph_for_external_crate_def(&mut self, parent: Module<'b>,
-                                                  child: Export) {
+    fn build_reduced_graph_for_external_crate_def(&mut self, parent: Module<'b>, child: Export) {
         let name = child.name;
         let def = child.def;
         let def_id = def.def_id();
@@ -545,9 +544,11 @@ impl<'b> Resolver<'b> {
         module.populated.set(true)
     }
 
-    fn legacy_import_macro(
-        &mut self, name: Name, binding: &'b NameBinding<'b>, span: Span, allow_shadowing: bool,
-    ) {
+    fn legacy_import_macro(&mut self,
+                           name: Name,
+                           binding: &'b NameBinding<'b>,
+                           span: Span,
+                           allow_shadowing: bool) {
         self.used_crates.insert(binding.def().def_id().krate);
         self.macro_names.insert(name);
         if self.builtin_macros.insert(name, binding).is_some() && !allow_shadowing {
diff --git a/src/librustc_resolve/macros.rs b/src/librustc_resolve/macros.rs
index 56d76272e23..524d491a464 100644
--- a/src/librustc_resolve/macros.rs
+++ b/src/librustc_resolve/macros.rs
@@ -262,9 +262,11 @@ impl<'a> base::Resolver for Resolver<'a> {
 
 impl<'a> Resolver<'a> {
     // Resolve the name in the module's lexical scope, excluding non-items.
-    fn resolve_in_item_lexical_scope(
-        &mut self, name: Name, ns: Namespace, record_used: Option<Span>,
-    ) -> Option<&'a NameBinding<'a>> {
+    fn resolve_in_item_lexical_scope(&mut self,
+                                     name: Name,
+                                     ns: Namespace,
+                                     record_used: Option<Span>)
+                                     -> Option<&'a NameBinding<'a>> {
         let mut module = self.current_module;
         let mut potential_expanded_shadower = None;
         loop {
@@ -298,9 +300,11 @@ impl<'a> Resolver<'a> {
         }
     }
 
-    pub fn resolve_legacy_scope(
-        &mut self, mut scope: LegacyScope<'a>, name: ast::Name, record_used: bool,
-    ) -> Option<MacroBinding<'a>> {
+    pub fn resolve_legacy_scope(&mut self,
+                                mut scope: LegacyScope<'a>,
+                                name: Name,
+                                record_used: bool)
+                                -> Option<MacroBinding<'a>> {
         let mut possible_time_travel = None;
         let mut relative_depth: u32 = 0;
         let mut binding = None;