diff options
| author | Matthias Einwag <matthias.einwag@live.com> | 2019-02-12 22:46:14 -0800 |
|---|---|---|
| committer | Matthias Einwag <matthias.einwag@live.com> | 2019-02-12 22:46:14 -0800 |
| commit | 871338c3aed87cb84f02ebd7fd9b447966d5b05d (patch) | |
| tree | a2e1315d7d17d0b9f3463686ed2fbf36f3238ec4 /src/libsyntax/diagnostics/plugin.rs | |
| parent | 1ef34a5a39641846e824b6450a705d6031002beb (diff) | |
| parent | 0f949c2fcc696d0260a99196d5e5400c59a26a54 (diff) | |
| download | rust-871338c3aed87cb84f02ebd7fd9b447966d5b05d.tar.gz rust-871338c3aed87cb84f02ebd7fd9b447966d5b05d.zip | |
Merging master
Diffstat (limited to 'src/libsyntax/diagnostics/plugin.rs')
| -rw-r--r-- | src/libsyntax/diagnostics/plugin.rs | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/src/libsyntax/diagnostics/plugin.rs b/src/libsyntax/diagnostics/plugin.rs index fa6b825f2a2..e79378d93bd 100644 --- a/src/libsyntax/diagnostics/plugin.rs +++ b/src/libsyntax/diagnostics/plugin.rs @@ -1,20 +1,21 @@ use std::collections::BTreeMap; use std::env; -use ast; -use ast::{Ident, Name}; -use source_map; +use crate::ast::{self, Ident, Name}; +use crate::source_map; +use crate::ext::base::{ExtCtxt, MacEager, MacResult}; +use crate::ext::build::AstBuilder; +use crate::parse::token; +use crate::ptr::P; +use crate::symbol::{keywords, Symbol}; +use crate::tokenstream::{TokenTree}; + +use smallvec::smallvec; use syntax_pos::Span; -use ext::base::{ExtCtxt, MacEager, MacResult}; -use ext::build::AstBuilder; -use parse::token; -use ptr::P; -use symbol::{keywords, Symbol}; -use tokenstream::{TokenTree}; -use diagnostics::metadata::output_metadata; +use crate::diagnostics::metadata::output_metadata; -pub use errors::*; +pub use crate::errors::*; // Maximum width of any line in an extended error description (inclusive). const MAX_DESCRIPTION_WIDTH: usize = 80; @@ -28,7 +29,7 @@ pub struct ErrorInfo { /// Mapping from error codes to metadata. pub type ErrorMap = BTreeMap<Name, ErrorInfo>; -pub fn expand_diagnostic_used<'cx>(ecx: &'cx mut ExtCtxt, +pub fn expand_diagnostic_used<'cx>(ecx: &'cx mut ExtCtxt<'_>, span: Span, token_tree: &[TokenTree]) -> Box<dyn MacResult+'cx> { @@ -61,7 +62,7 @@ pub fn expand_diagnostic_used<'cx>(ecx: &'cx mut ExtCtxt, MacEager::expr(ecx.expr_tuple(span, Vec::new())) } -pub fn expand_register_diagnostic<'cx>(ecx: &'cx mut ExtCtxt, +pub fn expand_register_diagnostic<'cx>(ecx: &'cx mut ExtCtxt<'_>, span: Span, token_tree: &[TokenTree]) -> Box<dyn MacResult+'cx> { @@ -134,7 +135,7 @@ pub fn expand_register_diagnostic<'cx>(ecx: &'cx mut ExtCtxt, } #[allow(deprecated)] -pub fn expand_build_diagnostic_array<'cx>(ecx: &'cx mut ExtCtxt, +pub fn expand_build_diagnostic_array<'cx>(ecx: &'cx mut ExtCtxt<'_>, span: Span, token_tree: &[TokenTree]) -> Box<dyn MacResult+'cx> { |
