diff options
| author | Niko Matsakis <niko@alum.mit.edu> | 2016-10-13 12:08:50 -0400 |
|---|---|---|
| committer | Niko Matsakis <niko@alum.mit.edu> | 2016-11-01 14:08:56 -0400 |
| commit | 2b5bc487c5e7a028f56820db49c8f2b1c6aec99a (patch) | |
| tree | 352e118345e753f0753beabfcb21fd404ad56ad0 /src/librustc_errors | |
| parent | 0aeab9a390b00f83b535f001ab9156638021ff99 (diff) | |
| download | rust-2b5bc487c5e7a028f56820db49c8f2b1c6aec99a.tar.gz rust-2b5bc487c5e7a028f56820db49c8f2b1c6aec99a.zip | |
improve early lint to use multispan from diagnostic
Diffstat (limited to 'src/librustc_errors')
| -rw-r--r-- | src/librustc_errors/diagnostic.rs | 4 | ||||
| -rw-r--r-- | src/librustc_errors/lib.rs | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/librustc_errors/diagnostic.rs b/src/librustc_errors/diagnostic.rs index c378d5f8d5b..0f37daa5196 100644 --- a/src/librustc_errors/diagnostic.rs +++ b/src/librustc_errors/diagnostic.rs @@ -6,7 +6,7 @@ use std::fmt; use syntax_pos::{MultiSpan, Span}; #[must_use] -#[derive(Clone, Debug)] +#[derive(Clone, Debug, PartialEq)] pub struct Diagnostic { pub level: Level, pub message: String, @@ -16,7 +16,7 @@ pub struct Diagnostic { } /// For example a note attached to an error. -#[derive(Clone, Debug)] +#[derive(Clone, Debug, PartialEq)] pub struct SubDiagnostic { pub level: Level, pub message: String, diff --git a/src/librustc_errors/lib.rs b/src/librustc_errors/lib.rs index d9ab0dd075b..badee66b83d 100644 --- a/src/librustc_errors/lib.rs +++ b/src/librustc_errors/lib.rs @@ -57,7 +57,7 @@ mod lock; use syntax_pos::{BytePos, Loc, FileLinesResult, FileName, MultiSpan, Span, NO_EXPANSION}; use syntax_pos::MacroBacktrace; -#[derive(Clone, Debug)] +#[derive(Clone, Debug, PartialEq)] pub enum RenderSpan { /// A FullSpan renders with both with an initial line for the /// message, prefixed by file:linenum, followed by a summary of @@ -71,7 +71,7 @@ pub enum RenderSpan { Suggestion(CodeSuggestion), } -#[derive(Clone, Debug)] +#[derive(Clone, Debug, PartialEq)] pub struct CodeSuggestion { pub msp: MultiSpan, pub substitutes: Vec<String>, |
