Module syntax::json [−][src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
A JSON emitter for errors.
This works by converting errors to a simplified structural format (see the structs at the start of the file) and then serializing them. These should contain as much information about the error as possible.
The format of the JSON output should be considered unstable. For now the structs at the end of this file (Diagnostic*) specify the error format.
Re-exports
use codemap::CodeMap; |
use codemap::FilePathMapping; |
use syntax_pos; |
use syntax_pos::MacroBacktrace; |
use syntax_pos::Span; |
use syntax_pos::SpanLabel; |
use syntax_pos::MultiSpan; |
use errors::registry::Registry; |
use errors::DiagnosticBuilder; |
use errors::SubDiagnostic; |
use errors::CodeSuggestion; |
use errors::CodeMapper; |
use errors::DiagnosticId; |
use errors::Applicability; |
use errors::emitter::Emitter; |
use errors::emitter::EmitterWriter; |
use rustc_data_structures::sync; |
use rustc_data_structures::sync::Lrc; |
use std::io; |
use std::io::Write; |
use std::vec; |
use std::sync::Arc; |
use std::sync::Mutex; |
use rustc_serialize::json::as_json; |
use rustc_serialize::json::as_pretty_json; |
Structs
Diagnostic |
[ Experimental ]
|
DiagnosticCode |
[ Experimental ]
|
DiagnosticSpan |
[ Experimental ]
|
DiagnosticSpanLine |
[ Experimental ]
|
DiagnosticSpanMacroExpansion |
[ Experimental ]
|
JsonEmitter |
[ Experimental ]
|