diff options
| author | Niko Matsakis <niko@alum.mit.edu> | 2017-01-28 18:13:21 -0500 |
|---|---|---|
| committer | Niko Matsakis <niko@alum.mit.edu> | 2017-02-02 20:38:16 -0500 |
| commit | d9aaca71cc61a7c0792da2789b5e278cc294733f (patch) | |
| tree | 3ffe2962528fe925ad364aefffea6e0cf3920257 /src/librustc_errors | |
| parent | 65b93ebcb8e2ff2d8747ce731108e8f5d9f7dddf (diff) | |
| download | rust-d9aaca71cc61a7c0792da2789b5e278cc294733f.tar.gz rust-d9aaca71cc61a7c0792da2789b5e278cc294733f.zip | |
store typeck lints in the `TypeckTables`
Otherwise they are a "hidden output"
Diffstat (limited to 'src/librustc_errors')
| -rw-r--r-- | src/librustc_errors/Cargo.toml | 1 | ||||
| -rw-r--r-- | src/librustc_errors/diagnostic.rs | 4 | ||||
| -rw-r--r-- | src/librustc_errors/lib.rs | 7 | ||||
| -rw-r--r-- | src/librustc_errors/snippet.rs | 2 |
4 files changed, 8 insertions, 6 deletions
diff --git a/src/librustc_errors/Cargo.toml b/src/librustc_errors/Cargo.toml index 2ba1f501a63..78ff52b4b23 100644 --- a/src/librustc_errors/Cargo.toml +++ b/src/librustc_errors/Cargo.toml @@ -9,4 +9,5 @@ path = "lib.rs" crate-type = ["dylib"] [dependencies] +serialize = { path = "../libserialize" } syntax_pos = { path = "../libsyntax_pos" } diff --git a/src/librustc_errors/diagnostic.rs b/src/librustc_errors/diagnostic.rs index ac39af20189..1b77ead92de 100644 --- a/src/librustc_errors/diagnostic.rs +++ b/src/librustc_errors/diagnostic.rs @@ -17,7 +17,7 @@ use syntax_pos::{MultiSpan, Span}; use snippet::Style; #[must_use] -#[derive(Clone, Debug, PartialEq)] +#[derive(Clone, Debug, PartialEq, RustcEncodable, RustcDecodable)] pub struct Diagnostic { pub level: Level, pub message: Vec<(String, Style)>, @@ -27,7 +27,7 @@ pub struct Diagnostic { } /// For example a note attached to an error. -#[derive(Clone, Debug, PartialEq)] +#[derive(Clone, Debug, PartialEq, RustcEncodable, RustcDecodable)] pub struct SubDiagnostic { pub level: Level, pub message: Vec<(String, Style)>, diff --git a/src/librustc_errors/lib.rs b/src/librustc_errors/lib.rs index bf5f7cde7eb..d7bd5ed23c2 100644 --- a/src/librustc_errors/lib.rs +++ b/src/librustc_errors/lib.rs @@ -26,6 +26,7 @@ extern crate term; extern crate libc; +extern crate serialize as rustc_serialize; extern crate syntax_pos; pub use emitter::ColorConfig; @@ -49,7 +50,7 @@ mod lock; use syntax_pos::{BytePos, Loc, FileLinesResult, FileName, MultiSpan, Span, NO_EXPANSION}; use syntax_pos::MacroBacktrace; -#[derive(Clone, Debug, PartialEq)] +#[derive(Clone, Debug, PartialEq, RustcEncodable, RustcDecodable)] pub enum RenderSpan { /// A FullSpan renders with both with an initial line for the /// message, prefixed by file:linenum, followed by a summary of @@ -63,7 +64,7 @@ pub enum RenderSpan { Suggestion(CodeSuggestion), } -#[derive(Clone, Debug, PartialEq)] +#[derive(Clone, Debug, PartialEq, RustcEncodable, RustcDecodable)] pub struct CodeSuggestion { pub msp: MultiSpan, pub substitutes: Vec<String>, @@ -477,7 +478,7 @@ impl Handler { } -#[derive(Copy, PartialEq, Clone, Debug)] +#[derive(Copy, PartialEq, Clone, Debug, RustcEncodable, RustcDecodable)] pub enum Level { Bug, Fatal, diff --git a/src/librustc_errors/snippet.rs b/src/librustc_errors/snippet.rs index 95b03677b72..5debbf4d37c 100644 --- a/src/librustc_errors/snippet.rs +++ b/src/librustc_errors/snippet.rs @@ -204,7 +204,7 @@ pub struct StyledString { pub style: Style, } -#[derive(Copy, Clone, Debug, PartialEq)] +#[derive(Copy, Clone, Debug, PartialEq, RustcEncodable, RustcDecodable)] pub enum Style { HeaderMsg, FileNameStyle, |
