Navigation Menu

Skip to content

Commit

Permalink
Minor cosmetic changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander Regueiro committed Feb 7, 2019
1 parent 497a772 commit 5c87bc8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
12 changes: 6 additions & 6 deletions src/librustc_resolve/error_reporting.rs
Expand Up @@ -417,7 +417,7 @@ impl<'a> Resolver<'a> {
}

impl<'a, 'b:'a> ImportResolver<'a, 'b> {
/// Add suggestions for a path that cannot be resolved.
/// Adds suggestions for a path that cannot be resolved.
pub(crate) fn make_path_suggestion(
&mut self,
span: Span,
Expand All @@ -431,7 +431,7 @@ impl<'a, 'b:'a> ImportResolver<'a, 'b> {
// On 2015 `{{root}}` is usually added implicitly.
(Some(fst), Some(snd)) if fst.ident.name == keywords::PathRoot.name() &&
!snd.ident.is_path_segment_keyword() => {}
// `ident::...` on 2018
// `ident::...` on 2018.
(Some(fst), _) if fst.ident.span.rust_2018() &&
!fst.ident.is_path_segment_keyword() => {
// Insert a placeholder that's later replaced by `self`/`super`/etc.
Expand Down Expand Up @@ -470,7 +470,7 @@ impl<'a, 'b:'a> ImportResolver<'a, 'b> {
}
}

/// Suggest a missing `crate::` if that resolves to an correct module.
/// Suggests a missing `crate::` if that resolves to an correct module.
///
/// ```
/// |
Expand Down Expand Up @@ -501,7 +501,7 @@ impl<'a, 'b:'a> ImportResolver<'a, 'b> {
}
}

/// Suggest a missing `super::` if that resolves to an correct module.
/// Suggests a missing `super::` if that resolves to an correct module.
///
/// ```
/// |
Expand All @@ -525,7 +525,7 @@ impl<'a, 'b:'a> ImportResolver<'a, 'b> {
}
}

/// Suggest a missing external crate name if that resolves to an correct module.
/// Suggests a missing external crate name if that resolves to an correct module.
///
/// ```
/// |
Expand All @@ -546,7 +546,7 @@ impl<'a, 'b:'a> ImportResolver<'a, 'b> {
}

// Sort extern crate names in reverse order to get
// 1) some consistent ordering for emitted dignostics and
// 1) some consistent ordering for emitted dignostics, and
// 2) `std` suggestions before `core` suggestions.
let mut extern_crate_names =
self.resolver.extern_prelude.iter().map(|(ident, _)| ident.name).collect::<Vec<_>>();
Expand Down
5 changes: 2 additions & 3 deletions src/librustc_resolve/lib.rs
Expand Up @@ -1737,7 +1737,7 @@ impl<'a> Resolver<'a> {
}
}

/// resolve_hir_path, but takes a callback in case there was an error
/// Like `resolve_hir_path`, but takes a callback in case there was an error.
fn resolve_hir_path_cb<F>(
&mut self,
path: &ast::Path,
Expand All @@ -1750,7 +1750,7 @@ impl<'a> Resolver<'a> {
let span = path.span;
let segments = &path.segments;
let path = Segment::from_path(&path);
// FIXME (Manishearth): Intra doc links won't get warned of epoch changes
// FIXME(Manishearth): intra-doc links won't get warned of epoch changes.
let def = match self.resolve_path_without_parent_scope(&path, Some(namespace), true,
span, CrateLint::No) {
PathResult::Module(ModuleOrUniformRoot::Module(module)) =>
Expand Down Expand Up @@ -5066,7 +5066,6 @@ fn import_candidate_to_enum_paths(suggestion: &ImportSuggestion) -> (String, Str
(variant_path_string, enum_path_string)
}


/// When an entity with a given name is not available in scope, we search for
/// entities with that name in all crates. This method allows outputting the
/// results of this search in a programmer-friendly way
Expand Down

0 comments on commit 5c87bc8

Please sign in to comment.