about summary refs log tree commit diff
path: root/compiler/rustc_errors
diff options
context:
space:
mode:
authorest31 <MTest31@outlook.com>2020-10-09 11:23:40 +0200
committerest31 <MTest31@outlook.com>2020-10-14 04:14:32 +0200
commit215cd36e1cff1806429806cb5be81f6d1a5f98b0 (patch)
tree9c6b9c881228f080c9f932d2561d98a06c6c394b /compiler/rustc_errors
parent58b3923ad377e79a0517ec15a672e3f8f90b10b4 (diff)
downloadrust-215cd36e1cff1806429806cb5be81f6d1a5f98b0.tar.gz
rust-215cd36e1cff1806429806cb5be81f6d1a5f98b0.zip
Remove unused code from remaining compiler crates
Diffstat (limited to 'compiler/rustc_errors')
-rw-r--r--compiler/rustc_errors/src/diagnostic.rs13
-rw-r--r--compiler/rustc_errors/src/emitter.rs2
2 files changed, 0 insertions, 15 deletions
diff --git a/compiler/rustc_errors/src/diagnostic.rs b/compiler/rustc_errors/src/diagnostic.rs
index 870f7b81e21..91bfc6296b1 100644
--- a/compiler/rustc_errors/src/diagnostic.rs
+++ b/compiler/rustc_errors/src/diagnostic.rs
@@ -121,11 +121,6 @@ impl Diagnostic {
         self.level == Level::Cancelled
     }
 
-    /// Set the sorting span.
-    pub fn set_sort_span(&mut self, sp: Span) {
-        self.sort_span = sp;
-    }
-
     /// Adds a span/label to be included in the resulting snippet.
     ///
     /// This is pushed onto the [`MultiSpan`] that was created when the diagnostic
@@ -535,14 +530,6 @@ impl Diagnostic {
         &self.message
     }
 
-    /// Used by a lint. Copies over all details *but* the "main
-    /// message".
-    pub fn copy_details_not_message(&mut self, from: &Diagnostic) {
-        self.span = from.span.clone();
-        self.code = from.code.clone();
-        self.children.extend(from.children.iter().cloned())
-    }
-
     /// Convenience function for internal use, clients should use one of the
     /// public methods above.
     pub fn sub(
diff --git a/compiler/rustc_errors/src/emitter.rs b/compiler/rustc_errors/src/emitter.rs
index 98cbf98df92..b5155f8e910 100644
--- a/compiler/rustc_errors/src/emitter.rs
+++ b/compiler/rustc_errors/src/emitter.rs
@@ -510,8 +510,6 @@ impl Emitter for SilentEmitter {
     fn emit_diagnostic(&mut self, _: &Diagnostic) {}
 }
 
-/// Maximum number of lines we will print for each error; arbitrary.
-pub const MAX_HIGHLIGHT_LINES: usize = 6;
 /// Maximum number of lines we will print for a multiline suggestion; arbitrary.
 ///
 /// This should be replaced with a more involved mechanism to output multiline suggestions that