diff --git a/src/librustc_resolve/lib.rs b/src/librustc_resolve/lib.rs index 939e6202257..f55a4c0a2a6 100644 --- a/src/librustc_resolve/lib.rs +++ b/src/librustc_resolve/lib.rs @@ -1660,7 +1660,13 @@ impl<'a> Resolver<'a> { PathResult::Module(module) => *def = module.def().unwrap(), PathResult::NonModule(path_res) if path_res.unresolved_segments() == 0 => *def = path_res.base_def(), - PathResult::NonModule(..) => match self.resolve_path(&path, None, true, span, CrateLint::No) { + PathResult::NonModule(..) => match self.resolve_path( + &path, + None, + true, + span, + CrateLint::No, + ) { PathResult::Failed(span, msg, _) => { error_callback(self, span, ResolutionError::FailedToResolve(&msg)); } @@ -3175,7 +3181,13 @@ impl<'a> Resolver<'a> { )); } - let result = match self.resolve_path(&path, Some(ns), true, span, CrateLint::SimplePath(id)) { + let result = match self.resolve_path( + &path, + Some(ns), + true, + span, + CrateLint::SimplePath(id), + ) { PathResult::NonModule(path_res) => path_res, PathResult::Module(module) if !module.is_normal() => { PathResolution::new(module.def().unwrap()) @@ -3212,7 +3224,13 @@ impl<'a> Resolver<'a> { path[0].name != keywords::CrateRoot.name() && path[0].name != keywords::DollarCrate.name() { let unqualified_result = { - match self.resolve_path(&[*path.last().unwrap()], Some(ns), false, span, CrateLint::No) { + match self.resolve_path( + &[*path.last().unwrap()], + Some(ns), + false, + span, + CrateLint::No, + ) { PathResult::NonModule(path_res) => path_res.base_def(), PathResult::Module(module) => module.def().unwrap(), _ => return Some(result), diff --git a/src/librustc_resolve/resolve_imports.rs b/src/librustc_resolve/resolve_imports.rs index 2661cd7bb67..2263401e6dc 100644 --- a/src/librustc_resolve/resolve_imports.rs +++ b/src/librustc_resolve/resolve_imports.rs @@ -60,7 +60,7 @@ pub struct ImportDirective<'a> { /// In the case where the `ImportDirective` was expanded from a "nested" use tree, /// this id is the id of the leaf tree. For example: /// - /// ```rust,ignore + /// ```ignore (pacify the mercilous tidy) /// use foo::bar::{a, b} /// ``` /// @@ -737,7 +737,13 @@ impl<'a, 'b:'a> ImportResolver<'a, 'b> { } } - let module_result = self.resolve_path(&module_path, None, true, span, directive.crate_lint()); + let module_result = self.resolve_path( + &module_path, + None, + true, + span, + directive.crate_lint(), + ); let module = match module_result { PathResult::Module(module) => module, PathResult::Failed(span, msg, false) => {