about summary refs log tree commit diff
diff options
context:
space:
mode:
authorAlexander Regueiro <alexreg@me.com>2019-02-04 11:24:09 +0100
committerAlexander Regueiro <alexreg@me.com>2019-02-07 22:28:16 +0100
commit5c87bc85e2d7395d671311a5b8b97013b2e73d87 (patch)
treeef00e671be5f00287446ef4ad46d6c7edaf53976
parent497a772d04731d9e93abb71ae99696684e514bb3 (diff)
downloadrust-5c87bc85e2d7395d671311a5b8b97013b2e73d87.tar.gz
rust-5c87bc85e2d7395d671311a5b8b97013b2e73d87.zip
Minor cosmetic changes.
-rw-r--r--src/librustc_resolve/error_reporting.rs12
-rw-r--r--src/librustc_resolve/lib.rs5
2 files changed, 8 insertions, 9 deletions
diff --git a/src/librustc_resolve/error_reporting.rs b/src/librustc_resolve/error_reporting.rs
index 88892ae2cd3..1f7ae7c3034 100644
--- a/src/librustc_resolve/error_reporting.rs
+++ b/src/librustc_resolve/error_reporting.rs
@@ -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,
@@ -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.
@@ -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.
     ///
     /// ```
     ///    |
@@ -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.
     ///
     /// ```
     ///    |
@@ -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.
     ///
     /// ```
     ///    |
@@ -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<_>>();
diff --git a/src/librustc_resolve/lib.rs b/src/librustc_resolve/lib.rs
index 590dcb8947d..69f8722a82b 100644
--- a/src/librustc_resolve/lib.rs
+++ b/src/librustc_resolve/lib.rs
@@ -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,
@@ -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)) =>
@@ -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