summary refs log tree commit diff
path: root/src/librustc_errors
diff options
context:
space:
mode:
authorAlexander Regueiro <alexreg@me.com>2019-02-08 14:53:55 +0100
committerAlexander Regueiro <alexreg@me.com>2019-02-10 23:42:32 +0000
commitc3e182cf43aea2c010a1915eb37293a458df2228 (patch)
tree225aa2dfceff56d10c0b31f6966fbf7ec5da8180 /src/librustc_errors
parent0b7af2668a80fb2fa720a06ca44aff4dd1e9de38 (diff)
downloadrust-c3e182cf43aea2c010a1915eb37293a458df2228.tar.gz
rust-c3e182cf43aea2c010a1915eb37293a458df2228.zip
rustc: doc comments
Diffstat (limited to 'src/librustc_errors')
-rw-r--r--src/librustc_errors/diagnostic.rs2
-rw-r--r--src/librustc_errors/diagnostic_builder.rs4
-rw-r--r--src/librustc_errors/emitter.rs6
-rw-r--r--src/librustc_errors/lib.rs2
4 files changed, 7 insertions, 7 deletions
diff --git a/src/librustc_errors/diagnostic.rs b/src/librustc_errors/diagnostic.rs
index aefe296ad0f..2c410f69bfc 100644
--- a/src/librustc_errors/diagnostic.rs
+++ b/src/librustc_errors/diagnostic.rs
@@ -118,7 +118,7 @@ impl Diagnostic {
         self.level == Level::Cancelled
     }
 
-    /// Add a span/label to be included in the resulting snippet.
+    /// Adds a span/label to be included in the resulting snippet.
     /// This is pushed onto the `MultiSpan` that was created when the
     /// diagnostic was first built. If you don't call this function at
     /// all, and you just supplied a `Span` to create the diagnostic,
diff --git a/src/librustc_errors/diagnostic_builder.rs b/src/librustc_errors/diagnostic_builder.rs
index fd4ea7f2d82..9d5e8d10b17 100644
--- a/src/librustc_errors/diagnostic_builder.rs
+++ b/src/librustc_errors/diagnostic_builder.rs
@@ -26,7 +26,7 @@ pub struct DiagnosticBuilder<'a> {
 
 /// In general, the `DiagnosticBuilder` uses deref to allow access to
 /// the fields and methods of the embedded `diagnostic` in a
-/// transparent way.  *However,* many of the methods are intended to
+/// transparent way. *However,* many of the methods are intended to
 /// be used in a chained way, and hence ought to return `self`. In
 /// that case, we can't just naively forward to the method on the
 /// `diagnostic`, because the return type would be a `&Diagnostic`
@@ -150,7 +150,7 @@ impl<'a> DiagnosticBuilder<'a> {
         self.cancel();
     }
 
-    /// Add a span/label to be included in the resulting snippet.
+    /// Adds a span/label to be included in the resulting snippet.
     /// This is pushed onto the `MultiSpan` that was created when the
     /// diagnostic was first built. If you don't call this function at
     /// all, and you just supplied a `Span` to create the diagnostic,
diff --git a/src/librustc_errors/emitter.rs b/src/librustc_errors/emitter.rs
index 2821201173e..1c0c9d137e4 100644
--- a/src/librustc_errors/emitter.rs
+++ b/src/librustc_errors/emitter.rs
@@ -22,7 +22,7 @@ pub trait Emitter {
     /// Emit a structured diagnostic.
     fn emit(&mut self, db: &DiagnosticBuilder<'_>);
 
-    /// Check if should show explanations about "rustc --explain"
+    /// Checks if should show explanations about "rustc --explain"
     fn should_show_explain(&self) -> bool {
         true
     }
@@ -868,7 +868,7 @@ impl EmitterWriter {
         }
     }
 
-    /// Add a left margin to every line but the first, given a padding length and the label being
+    /// Adds a left margin to every line but the first, given a padding length and the label being
     /// displayed, keeping the provided highlighting.
     fn msg_to_buffer(&self,
                      buffer: &mut StyledBuffer,
@@ -895,7 +895,7 @@ impl EmitterWriter {
         //    `max_line_num_len`
         let padding = " ".repeat(padding + label.len() + 5);
 
-        /// Return whether `style`, or the override if present and the style is `NoStyle`.
+        /// Returns `true` if `style`, or the override if present and the style is `NoStyle`.
         fn style_or_override(style: Style, override_style: Option<Style>) -> Style {
             if let Some(o) = override_style {
                 if style == Style::NoStyle {
diff --git a/src/librustc_errors/lib.rs b/src/librustc_errors/lib.rs
index ea530fa1bfb..08af62afd4c 100644
--- a/src/librustc_errors/lib.rs
+++ b/src/librustc_errors/lib.rs
@@ -389,7 +389,7 @@ impl Handler {
 
     /// Resets the diagnostic error count as well as the cached emitted diagnostics.
     ///
-    /// NOTE: DO NOT call this function from rustc. It is only meant to be called from external
+    /// NOTE: *do not* call this function from rustc. It is only meant to be called from external
     /// tools that want to reuse a `Parser` cleaning the previously emitted diagnostics as well as
     /// the overall count of emitted error diagnostics.
     pub fn reset_err_count(&self) {