Module syntax::diagnostics::metadata [−][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?
This module contains utilities for outputting metadata for diagnostic errors.
Each set of errors is mapped to a metadata file by a name, which is currently always a crate name.
Re-exports
use std::collections::BTreeMap; |
use std::env; |
use std::fs::remove_file; |
use std::fs::create_dir_all; |
use std::fs::File; |
use std::io::Write; |
use std::path::PathBuf; |
use std::error::Error; |
use rustc_serialize::json::as_json; |
use syntax_pos::Span; |
use syntax_pos::FileName; |
use ext::base::ExtCtxt; |
use diagnostics::plugin::ErrorMap; |
use diagnostics::plugin::ErrorInfo; |
Structs
ErrorLocation |
[ Experimental ] JSON encodable error location type with filename and line number. |
ErrorMetadata |
[ Experimental ] JSON encodable/decodable version of |
Functions
get_metadata_dir |
[ Experimental ] Get the directory where metadata for a given |
get_metadata_path |
[ Experimental ] Map |
output_metadata |
[ Experimental ] Write metadata for the errors in |
Type Definitions
ErrorMetadataMap |
[ Experimental ] Mapping from error codes to metadata that can be (de)serialized. |