mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 07:14:28 +00:00
Rename rustc_errors dependency in rust 2018 crates
This commit is contained in:
parent
c84e797642
commit
3216c7656a
@ -25,7 +25,7 @@ rustc-rayon-core = "0.1.1"
|
||||
rustc_apfloat = { path = "../librustc_apfloat" }
|
||||
rustc_target = { path = "../librustc_target" }
|
||||
rustc_data_structures = { path = "../librustc_data_structures" }
|
||||
rustc_errors = { path = "../librustc_errors" }
|
||||
errors = { path = "../librustc_errors", package = "rustc_errors" }
|
||||
serialize = { path = "../libserialize" }
|
||||
syntax = { path = "../libsyntax" }
|
||||
syntax_pos = { path = "../libsyntax_pos" }
|
||||
|
@ -1,4 +1,4 @@
|
||||
use crate::errors::{Diagnostic, DiagnosticBuilder};
|
||||
use errors::{Diagnostic, DiagnosticBuilder};
|
||||
use rustc_data_structures::stable_hasher::{HashStable, StableHasher};
|
||||
use rustc_data_structures::fx::{FxHashMap, FxHashSet};
|
||||
use rustc_data_structures::indexed_vec::{Idx, IndexVec};
|
||||
|
@ -31,7 +31,7 @@
|
||||
//! in the HIR, especially for multiple identifiers.
|
||||
|
||||
use crate::dep_graph::DepGraph;
|
||||
use crate::errors::Applicability;
|
||||
use errors::Applicability;
|
||||
use crate::hir::{self, ParamName};
|
||||
use crate::hir::HirVec;
|
||||
use crate::hir::map::{DefKey, DefPathData, Definitions};
|
||||
|
@ -10,7 +10,7 @@ pub use self::PrimTy::*;
|
||||
pub use self::UnOp::*;
|
||||
pub use self::UnsafeSource::*;
|
||||
|
||||
use crate::errors::FatalError;
|
||||
use errors::FatalError;
|
||||
use crate::hir::def::Def;
|
||||
use crate::hir::def_id::{DefId, DefIndex, LocalDefId, CRATE_DEF_INDEX};
|
||||
use crate::util::nodemap::{NodeMap, FxHashSet};
|
||||
|
@ -50,7 +50,7 @@ use super::region_constraints::GenericKind;
|
||||
use super::{InferCtxt, RegionVariableOrigin, SubregionOrigin, TypeTrace, ValuePairs};
|
||||
use crate::infer::{self, SuppressRegionErrors};
|
||||
|
||||
use crate::errors::{Applicability, DiagnosticBuilder, DiagnosticStyledString};
|
||||
use errors::{Applicability, DiagnosticBuilder, DiagnosticStyledString};
|
||||
use crate::hir;
|
||||
use crate::hir::def_id::DefId;
|
||||
use crate::hir::Node;
|
||||
|
@ -5,7 +5,7 @@ use crate::infer::type_variable::TypeVariableOrigin;
|
||||
use crate::ty::{self, Ty, Infer, TyVar};
|
||||
use syntax::source_map::CompilerDesugaringKind;
|
||||
use syntax_pos::Span;
|
||||
use crate::errors::DiagnosticBuilder;
|
||||
use errors::DiagnosticBuilder;
|
||||
|
||||
struct FindLocalByTypeVisitor<'a, 'gcx: 'a + 'tcx, 'tcx: 'a> {
|
||||
infcx: &'a InferCtxt<'a, 'gcx, 'tcx>,
|
||||
|
@ -3,7 +3,7 @@
|
||||
use crate::infer::error_reporting::nice_region_error::NiceRegionError;
|
||||
use crate::ty;
|
||||
use crate::util::common::ErrorReported;
|
||||
use crate::errors::Applicability;
|
||||
use errors::Applicability;
|
||||
|
||||
impl<'a, 'gcx, 'tcx> NiceRegionError<'a, 'gcx, 'tcx> {
|
||||
/// When given a `ConcreteFailure` for a function with arguments containing a named region and
|
||||
|
@ -1,4 +1,4 @@
|
||||
use crate::errors::DiagnosticBuilder;
|
||||
use errors::DiagnosticBuilder;
|
||||
use crate::hir::def_id::DefId;
|
||||
use crate::infer::error_reporting::nice_region_error::NiceRegionError;
|
||||
use crate::infer::lexical_region_resolve::RegionResolutionError;
|
||||
|
@ -4,7 +4,7 @@ use crate::infer::error_reporting::nice_region_error::NiceRegionError;
|
||||
use crate::infer::lexical_region_resolve::RegionResolutionError;
|
||||
use crate::ty::{BoundRegion, FreeRegion, RegionKind};
|
||||
use crate::util::common::ErrorReported;
|
||||
use crate::errors::Applicability;
|
||||
use errors::Applicability;
|
||||
|
||||
impl<'a, 'gcx, 'tcx> NiceRegionError<'a, 'gcx, 'tcx> {
|
||||
/// Print the error message for lifetime errors when the return type is a static impl Trait.
|
||||
|
@ -2,7 +2,7 @@ use crate::infer::{self, InferCtxt, SubregionOrigin};
|
||||
use crate::middle::region;
|
||||
use crate::ty::{self, Region};
|
||||
use crate::ty::error::TypeError;
|
||||
use crate::errors::DiagnosticBuilder;
|
||||
use errors::DiagnosticBuilder;
|
||||
|
||||
impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> {
|
||||
pub(super) fn note_region_origin(&self,
|
||||
|
@ -8,7 +8,7 @@ pub use self::ValuePairs::*;
|
||||
pub use crate::ty::IntVarValue;
|
||||
|
||||
use arena::SyncDroplessArena;
|
||||
use crate::errors::DiagnosticBuilder;
|
||||
use errors::DiagnosticBuilder;
|
||||
use crate::hir::def_id::DefId;
|
||||
use crate::infer::canonical::{Canonical, CanonicalVarValues};
|
||||
use crate::middle::free_region::RegionRelations;
|
||||
|
@ -153,8 +153,6 @@ mod rustc {
|
||||
pub use crate::lint;
|
||||
}
|
||||
|
||||
use rustc_errors as errors;
|
||||
|
||||
// FIXME(#27438): right now the unit tests of librustc don't refer to any actual
|
||||
// functions generated in librustc_data_structures (all
|
||||
// references are through generic functions), but statics are
|
||||
|
@ -4,7 +4,7 @@
|
||||
//! compiler code, rather than using their own custom pass. Those
|
||||
//! lints are all available in `rustc_lint::builtin`.
|
||||
|
||||
use crate::errors::{Applicability, DiagnosticBuilder};
|
||||
use errors::{Applicability, DiagnosticBuilder};
|
||||
use crate::lint::{LintPass, LateLintPass, LintArray};
|
||||
use crate::session::Session;
|
||||
use syntax::ast;
|
||||
|
@ -34,7 +34,7 @@ use std::default::Default as StdDefault;
|
||||
use syntax::ast;
|
||||
use syntax::edition;
|
||||
use syntax_pos::{MultiSpan, Span, symbol::{LocalInternedString, Symbol}};
|
||||
use crate::errors::DiagnosticBuilder;
|
||||
use errors::DiagnosticBuilder;
|
||||
use crate::hir;
|
||||
use crate::hir::def_id::LOCAL_CRATE;
|
||||
use crate::hir::intravisit as hir_visit;
|
||||
|
@ -1,6 +1,6 @@
|
||||
use std::cmp;
|
||||
|
||||
use crate::errors::{Applicability, DiagnosticBuilder};
|
||||
use errors::{Applicability, DiagnosticBuilder};
|
||||
use crate::hir::HirId;
|
||||
use crate::ich::StableHashingContext;
|
||||
use crate::lint::builtin;
|
||||
|
@ -23,7 +23,7 @@ pub use self::LintSource::*;
|
||||
|
||||
use rustc_data_structures::sync::{self, Lrc};
|
||||
|
||||
use crate::errors::{DiagnosticBuilder, DiagnosticId};
|
||||
use errors::{DiagnosticBuilder, DiagnosticId};
|
||||
use crate::hir::def_id::{CrateNum, LOCAL_CRATE};
|
||||
use crate::hir::intravisit;
|
||||
use crate::hir;
|
||||
|
@ -10,7 +10,7 @@ use syntax::ast::{Attribute, MetaItem, MetaItemKind};
|
||||
use syntax_pos::Span;
|
||||
use crate::hir::intravisit::{self, NestedVisitorMap, Visitor};
|
||||
use rustc_data_structures::fx::{FxHashSet, FxHashMap};
|
||||
use crate::errors::DiagnosticId;
|
||||
use errors::DiagnosticId;
|
||||
|
||||
pub struct LibFeatures {
|
||||
// A map from feature to stabilisation version.
|
||||
|
@ -102,7 +102,7 @@ use crate::hir::Node;
|
||||
use crate::ty::{self, TyCtxt};
|
||||
use crate::ty::query::Providers;
|
||||
use crate::lint;
|
||||
use crate::errors::Applicability;
|
||||
use errors::Applicability;
|
||||
use crate::util::nodemap::{NodeMap, HirIdMap, HirIdSet};
|
||||
|
||||
use std::collections::{BTreeMap, VecDeque};
|
||||
|
@ -11,7 +11,7 @@ use crate::hir::map::Map;
|
||||
use crate::hir::{GenericArg, GenericParam, ItemLocalId, LifetimeName, Node, ParamName};
|
||||
use crate::ty::{self, DefIdTree, GenericParamDefKind, TyCtxt};
|
||||
|
||||
use crate::errors::{Applicability, DiagnosticBuilder};
|
||||
use errors::{Applicability, DiagnosticBuilder};
|
||||
use crate::rustc::lint;
|
||||
use rustc_data_structures::sync::Lrc;
|
||||
use crate::session::Session;
|
||||
|
@ -11,7 +11,7 @@ use super::{RawConst, Pointer, InboundsCheck, ScalarMaybeUndef};
|
||||
use backtrace::Backtrace;
|
||||
|
||||
use crate::ty::query::TyCtxtAt;
|
||||
use crate::errors::DiagnosticBuilder;
|
||||
use errors::DiagnosticBuilder;
|
||||
|
||||
use syntax_pos::{Pos, Span};
|
||||
use syntax::ast;
|
||||
|
@ -19,7 +19,7 @@ use syntax::parse;
|
||||
use syntax::symbol::Symbol;
|
||||
use syntax::feature_gate::UnstableFeatures;
|
||||
|
||||
use crate::errors::{ColorConfig, FatalError, Handler};
|
||||
use errors::{ColorConfig, FatalError, Handler};
|
||||
|
||||
use getopts;
|
||||
use std::collections::{BTreeMap, BTreeSet};
|
||||
@ -2567,7 +2567,6 @@ mod dep_tracking {
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use crate::errors;
|
||||
use getopts;
|
||||
use crate::lint;
|
||||
use crate::middle::cstore;
|
||||
|
@ -21,8 +21,8 @@ use rustc_data_structures::sync::{
|
||||
Ordering::SeqCst,
|
||||
};
|
||||
|
||||
use crate::errors::{self, DiagnosticBuilder, DiagnosticId, Applicability};
|
||||
use crate::errors::emitter::{Emitter, EmitterWriter};
|
||||
use errors::{DiagnosticBuilder, DiagnosticId, Applicability};
|
||||
use errors::emitter::{Emitter, EmitterWriter};
|
||||
use syntax::ast::{self, NodeId};
|
||||
use syntax::edition::Edition;
|
||||
use syntax::feature_gate::{self, AttributeType};
|
||||
|
@ -39,7 +39,7 @@ pub struct OverlapResult<'tcx> {
|
||||
pub involves_placeholder: bool,
|
||||
}
|
||||
|
||||
pub fn add_placeholder_note(err: &mut crate::errors::DiagnosticBuilder<'_>) {
|
||||
pub fn add_placeholder_note(err: &mut errors::DiagnosticBuilder<'_>) {
|
||||
err.note(&format!(
|
||||
"this behavior recently changed as a result of a bug fix; \
|
||||
see rust-lang/rust#56105 for details"
|
||||
|
@ -17,7 +17,7 @@ use super::{
|
||||
Overflow,
|
||||
};
|
||||
|
||||
use crate::errors::{Applicability, DiagnosticBuilder};
|
||||
use errors::{Applicability, DiagnosticBuilder};
|
||||
use crate::hir;
|
||||
use crate::hir::Node;
|
||||
use crate::hir::def_id::DefId;
|
||||
|
@ -103,7 +103,7 @@ impl IntercrateAmbiguityCause {
|
||||
/// See #23980 for details.
|
||||
pub fn add_intercrate_ambiguity_hint<'a, 'tcx>(
|
||||
&self,
|
||||
err: &mut crate::errors::DiagnosticBuilder<'_>,
|
||||
err: &mut errors::DiagnosticBuilder<'_>,
|
||||
) {
|
||||
err.note(&self.intercrate_ambiguity_hint());
|
||||
}
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
use crate::dep_graph::DepGraph;
|
||||
use crate::dep_graph::{self, DepNode, DepConstructor};
|
||||
use crate::errors::DiagnosticBuilder;
|
||||
use errors::DiagnosticBuilder;
|
||||
use crate::session::Session;
|
||||
use crate::session::config::{BorrowckMode, OutputFilenames};
|
||||
use crate::session::config::CrateType;
|
||||
@ -1819,7 +1819,7 @@ pub mod tls {
|
||||
use std::ptr;
|
||||
use syntax_pos;
|
||||
use crate::ty::query;
|
||||
use crate::errors::{Diagnostic, TRACK_DIAGNOSTICS};
|
||||
use errors::{Diagnostic, TRACK_DIAGNOSTICS};
|
||||
use rustc_data_structures::OnDrop;
|
||||
use rustc_data_structures::sync::{self, Lrc, Lock};
|
||||
use rustc_data_structures::thin_vec::ThinVec;
|
||||
|
@ -4,7 +4,7 @@ use std::borrow::Cow;
|
||||
use std::fmt;
|
||||
use rustc_target::spec::abi;
|
||||
use syntax::ast;
|
||||
use crate::errors::{Applicability, DiagnosticBuilder};
|
||||
use errors::{Applicability, DiagnosticBuilder};
|
||||
use syntax_pos::Span;
|
||||
|
||||
use crate::hir;
|
||||
|
@ -1,5 +1,5 @@
|
||||
use crate::dep_graph::{self, DepConstructor, DepNode};
|
||||
use crate::errors::DiagnosticBuilder;
|
||||
use errors::DiagnosticBuilder;
|
||||
use crate::hir::def_id::{CrateNum, DefId, DefIndex};
|
||||
use crate::hir::def::{Def, Export};
|
||||
use crate::hir::{self, TraitCandidate, ItemLocalId, CodegenFnAttrs};
|
||||
|
@ -1,5 +1,5 @@
|
||||
use crate::dep_graph::{DepNodeIndex, SerializedDepNodeIndex};
|
||||
use crate::errors::Diagnostic;
|
||||
use errors::Diagnostic;
|
||||
use crate::hir;
|
||||
use crate::hir::def_id::{CrateNum, DefIndex, DefId, LocalDefId, LOCAL_CRATE};
|
||||
use crate::hir::map::definitions::DefPathHash;
|
||||
|
@ -3,10 +3,10 @@
|
||||
//! provider, manage the caches, and so forth.
|
||||
|
||||
use crate::dep_graph::{DepNodeIndex, DepNode, DepKind, SerializedDepNodeIndex};
|
||||
use crate::errors::DiagnosticBuilder;
|
||||
use crate::errors::Level;
|
||||
use crate::errors::Diagnostic;
|
||||
use crate::errors::FatalError;
|
||||
use errors::DiagnosticBuilder;
|
||||
use errors::Level;
|
||||
use errors::Diagnostic;
|
||||
use errors::FatalError;
|
||||
use crate::ty::tls;
|
||||
use crate::ty::{TyCtxt};
|
||||
use crate::ty::query::Query;
|
||||
|
@ -16,7 +16,7 @@ log = "0.4"
|
||||
syntax = { path = "../libsyntax" }
|
||||
rustc = { path = "../librustc" }
|
||||
arena = { path = "../libarena" }
|
||||
rustc_errors = { path = "../librustc_errors" }
|
||||
errors = { path = "../librustc_errors", package = "rustc_errors" }
|
||||
syntax_pos = { path = "../libsyntax_pos" }
|
||||
rustc_data_structures = { path = "../librustc_data_structures" }
|
||||
rustc_metadata = { path = "../librustc_metadata" }
|
||||
|
@ -22,7 +22,7 @@ use std::cell::Cell;
|
||||
use std::ptr;
|
||||
use rustc_data_structures::sync::Lrc;
|
||||
|
||||
use crate::errors::Applicability;
|
||||
use errors::Applicability;
|
||||
|
||||
use syntax::ast::{Name, Ident};
|
||||
use syntax::attr;
|
||||
|
@ -10,8 +10,6 @@
|
||||
|
||||
#![deny(rust_2018_idioms)]
|
||||
|
||||
use rustc_errors as errors;
|
||||
|
||||
pub use rustc::hir::def::{Namespace, PerNS};
|
||||
|
||||
use GenericParameters::*;
|
||||
|
@ -27,7 +27,7 @@ use syntax::symbol::{Symbol, keywords};
|
||||
use syntax::visit::Visitor;
|
||||
use syntax::util::lev_distance::find_best_match_for_name;
|
||||
use syntax_pos::{Span, DUMMY_SP};
|
||||
use crate::errors::Applicability;
|
||||
use errors::Applicability;
|
||||
|
||||
use std::cell::Cell;
|
||||
use std::{mem, ptr};
|
||||
|
@ -15,7 +15,7 @@ serialize = { path = "../libserialize" }
|
||||
log = "0.4"
|
||||
scoped-tls = "0.1"
|
||||
syntax_pos = { path = "../libsyntax_pos" }
|
||||
rustc_errors = { path = "../librustc_errors" }
|
||||
errors = { path = "../librustc_errors", package = "rustc_errors" }
|
||||
rustc_data_structures = { path = "../librustc_data_structures" }
|
||||
rustc_target = { path = "../librustc_target" }
|
||||
smallvec = { version = "0.6.7", features = ["union", "may_dangle"] }
|
||||
|
@ -1,7 +1,7 @@
|
||||
//! Parsing and validation of builtin attributes
|
||||
|
||||
use crate::ast::{self, Attribute, MetaItem, Name, NestedMetaItemKind};
|
||||
use crate::errors::{Applicability, Handler};
|
||||
use errors::{Applicability, Handler};
|
||||
use crate::feature_gate::{Features, GatedCfg};
|
||||
use crate::parse::ParseSess;
|
||||
|
||||
|
@ -9,7 +9,7 @@ use crate::feature_gate::{
|
||||
use crate::attr;
|
||||
use crate::ast;
|
||||
use crate::edition::Edition;
|
||||
use crate::errors::Applicability;
|
||||
use errors::Applicability;
|
||||
use crate::mut_visit::*;
|
||||
use crate::parse::{token, ParseSess};
|
||||
use crate::ptr::P;
|
||||
|
@ -15,7 +15,7 @@ use syntax_pos::Span;
|
||||
|
||||
use crate::diagnostics::metadata::output_metadata;
|
||||
|
||||
pub use crate::errors::*;
|
||||
pub use errors::*;
|
||||
|
||||
// Maximum width of any line in an extended error description (inclusive).
|
||||
const MAX_DESCRIPTION_WIDTH: usize = 80;
|
||||
|
@ -4,7 +4,7 @@ use crate::ast::{self, Attribute, Name, PatKind, MetaItem};
|
||||
use crate::attr::HasAttrs;
|
||||
use crate::source_map::{SourceMap, Spanned, respan};
|
||||
use crate::edition::Edition;
|
||||
use crate::errors::{DiagnosticBuilder, DiagnosticId};
|
||||
use errors::{DiagnosticBuilder, DiagnosticId};
|
||||
use crate::ext::expand::{self, AstFragment, Invocation};
|
||||
use crate::ext::hygiene::{self, Mark, SyntaxContext, Transparency};
|
||||
use crate::mut_visit::{self, MutVisitor};
|
||||
|
@ -3,7 +3,7 @@ use crate::ast::{MacStmtStyle, StmtKind, ItemKind};
|
||||
use crate::attr::{self, HasAttrs};
|
||||
use crate::source_map::{ExpnInfo, MacroBang, MacroAttribute, dummy_spanned, respan};
|
||||
use crate::config::StripUnconfigured;
|
||||
use crate::errors::{Applicability, FatalError};
|
||||
use errors::{Applicability, FatalError};
|
||||
use crate::ext::base::*;
|
||||
use crate::ext::derive::{add_derived_markers, collect_derives};
|
||||
use crate::ext::hygiene::{self, Mark, SyntaxContext};
|
||||
|
@ -75,7 +75,7 @@ pub use ParseResult::*;
|
||||
use TokenTreeOrTokenTreeSlice::*;
|
||||
|
||||
use crate::ast::Ident;
|
||||
use crate::errors::FatalError;
|
||||
use errors::FatalError;
|
||||
use crate::ext::tt::quoted::{self, TokenTree};
|
||||
use crate::parse::{Directory, ParseSess};
|
||||
use crate::parse::parser::{Parser, PathStyle};
|
||||
|
@ -1,6 +1,6 @@
|
||||
use crate::{ast, attr};
|
||||
use crate::edition::Edition;
|
||||
use crate::errors::FatalError;
|
||||
use errors::FatalError;
|
||||
use crate::ext::base::{DummyResult, ExtCtxt, MacResult, SyntaxExtension};
|
||||
use crate::ext::base::{NormalTT, TTMacroExpander};
|
||||
use crate::ext::expand::{AstFragment, AstFragmentKind};
|
||||
@ -25,7 +25,7 @@ use std::borrow::Cow;
|
||||
use std::collections::hash_map::Entry;
|
||||
|
||||
use rustc_data_structures::sync::Lrc;
|
||||
use crate::errors::Applicability;
|
||||
use errors::Applicability;
|
||||
|
||||
const VALID_FRAGMENT_NAMES_MSG: &str = "valid fragment specifiers are \
|
||||
`ident`, `block`, `stmt`, `expr`, `pat`, `ty`, `lifetime`, `literal`, \
|
||||
|
@ -20,7 +20,7 @@ use crate::attr;
|
||||
use crate::early_buffered_lints::BufferedEarlyLintId;
|
||||
use crate::source_map::Spanned;
|
||||
use crate::edition::{ALL_EDITIONS, Edition};
|
||||
use crate::errors::{DiagnosticBuilder, Handler};
|
||||
use errors::{DiagnosticBuilder, Handler};
|
||||
use crate::visit::{self, FnKind, Visitor};
|
||||
use crate::parse::ParseSess;
|
||||
use crate::symbol::Symbol;
|
||||
|
@ -10,10 +10,10 @@
|
||||
// FIXME: spec the JSON output properly.
|
||||
|
||||
use crate::source_map::{SourceMap, FilePathMapping};
|
||||
use crate::errors::registry::Registry;
|
||||
use crate::errors::{DiagnosticBuilder, SubDiagnostic, CodeSuggestion, SourceMapper};
|
||||
use crate::errors::{DiagnosticId, Applicability};
|
||||
use crate::errors::emitter::{Emitter, EmitterWriter};
|
||||
use errors::registry::Registry;
|
||||
use errors::{DiagnosticBuilder, SubDiagnostic, CodeSuggestion, SourceMapper};
|
||||
use errors::{DiagnosticId, Applicability};
|
||||
use errors::emitter::{Emitter, EmitterWriter};
|
||||
|
||||
use syntax_pos::{self, MacroBacktrace, Span, SpanLabel, MultiSpan};
|
||||
use rustc_data_structures::sync::{self, Lrc};
|
||||
|
@ -25,7 +25,7 @@
|
||||
#[allow(unused_extern_crates)]
|
||||
extern crate serialize as rustc_serialize; // used by deriving
|
||||
|
||||
pub use rustc_errors as errors;
|
||||
pub use errors;
|
||||
use rustc_data_structures::sync::Lock;
|
||||
use rustc_data_structures::bit_set::GrowableBitSet;
|
||||
pub use rustc_data_structures::thin_vec::ThinVec;
|
||||
@ -38,7 +38,7 @@ use ast::AttrId;
|
||||
macro_rules! panictry {
|
||||
($e:expr) => ({
|
||||
use std::result::Result::{Ok, Err};
|
||||
use crate::errors::FatalError;
|
||||
use errors::FatalError;
|
||||
match $e {
|
||||
Ok(e) => e,
|
||||
Err(mut e) => {
|
||||
@ -53,7 +53,7 @@ macro_rules! panictry {
|
||||
macro_rules! panictry_buffer {
|
||||
($handler:expr, $e:expr) => ({
|
||||
use std::result::Result::{Ok, Err};
|
||||
use crate::errors::{FatalError, DiagnosticBuilder};
|
||||
use errors::{FatalError, DiagnosticBuilder};
|
||||
match $e {
|
||||
Ok(e) => e,
|
||||
Err(errs) => {
|
||||
|
@ -1,6 +1,6 @@
|
||||
use crate::ast::{self, Ident};
|
||||
use crate::source_map::{SourceMap, FilePathMapping};
|
||||
use crate::errors::{Applicability, FatalError, Diagnostic, DiagnosticBuilder};
|
||||
use errors::{Applicability, FatalError, Diagnostic, DiagnosticBuilder};
|
||||
use crate::parse::{token, ParseSess};
|
||||
use crate::symbol::{Symbol, keywords};
|
||||
|
||||
@ -1882,7 +1882,6 @@ mod tests {
|
||||
use crate::ast::{Ident, CrateConfig};
|
||||
use crate::symbol::Symbol;
|
||||
use crate::source_map::SourceMap;
|
||||
use crate::errors;
|
||||
use crate::feature_gate::UnstableFeatures;
|
||||
use crate::parse::token;
|
||||
use crate::diagnostics::plugin::ErrorMap;
|
||||
|
@ -2,7 +2,7 @@
|
||||
// http://www.unicode.org/Public/security/10.0.0/confusables.txt
|
||||
|
||||
use syntax_pos::{Span, NO_EXPANSION};
|
||||
use crate::errors::{Applicability, DiagnosticBuilder};
|
||||
use errors::{Applicability, DiagnosticBuilder};
|
||||
use super::StringReader;
|
||||
|
||||
const UNICODE_ARRAY: &[(char, &str, char)] = &[
|
||||
|
@ -3,7 +3,7 @@
|
||||
use crate::ast::{self, CrateConfig, NodeId};
|
||||
use crate::early_buffered_lints::{BufferedEarlyLint, BufferedEarlyLintId};
|
||||
use crate::source_map::{SourceMap, FilePathMapping};
|
||||
use crate::errors::{FatalError, Level, Handler, ColorConfig, Diagnostic, DiagnosticBuilder};
|
||||
use errors::{FatalError, Level, Handler, ColorConfig, Diagnostic, DiagnosticBuilder};
|
||||
use crate::feature_gate::UnstableFeatures;
|
||||
use crate::parse::parser::Parser;
|
||||
use crate::symbol::Symbol;
|
||||
|
@ -33,7 +33,7 @@ use crate::ast::{RangeEnd, RangeSyntax};
|
||||
use crate::{ast, attr};
|
||||
use crate::ext::base::DummyResult;
|
||||
use crate::source_map::{self, SourceMap, Spanned, respan};
|
||||
use crate::errors::{self, Applicability, DiagnosticBuilder, DiagnosticId};
|
||||
use errors::{Applicability, DiagnosticBuilder, DiagnosticId};
|
||||
use crate::parse::{self, SeqSep, classify, token};
|
||||
use crate::parse::lexer::{TokenAndSpan, UnmatchedBrace};
|
||||
use crate::parse::lexer::comments::{doc_comment_style, strip_doc_comment_decoration};
|
||||
|
@ -6,7 +6,6 @@
|
||||
use std::str::FromStr;
|
||||
|
||||
use crate::ast;
|
||||
use crate::errors;
|
||||
use crate::visit;
|
||||
use crate::visit::Visitor;
|
||||
|
||||
|
@ -24,7 +24,7 @@ use std::fs;
|
||||
use std::io;
|
||||
use log::debug;
|
||||
|
||||
use crate::errors::SourceMapper;
|
||||
use errors::SourceMapper;
|
||||
|
||||
/// Return the span itself if it doesn't come from a macro expansion,
|
||||
/// otherwise return the call site span up to the `enclosing_sp` by
|
||||
|
@ -16,7 +16,7 @@ use syntax_pos::{self, DUMMY_SP, NO_EXPANSION, Span, SourceFile, BytePos};
|
||||
|
||||
use crate::attr::{self, HasAttrs};
|
||||
use crate::source_map::{self, SourceMap, ExpnInfo, MacroAttribute, dummy_spanned, respan};
|
||||
use crate::errors;
|
||||
use errors;
|
||||
use crate::config;
|
||||
use crate::entry::{self, EntryPointType};
|
||||
use crate::ext::base::{ExtCtxt, Resolver};
|
||||
|
@ -1,6 +1,6 @@
|
||||
use crate::source_map::{SourceMap, FilePathMapping};
|
||||
use crate::errors::Handler;
|
||||
use crate::errors::emitter::EmitterWriter;
|
||||
use errors::Handler;
|
||||
use errors::emitter::EmitterWriter;
|
||||
use crate::with_globals;
|
||||
|
||||
use std::io;
|
||||
|
@ -11,7 +11,7 @@ crate-type = ["dylib"]
|
||||
|
||||
[dependencies]
|
||||
fmt_macros = { path = "../libfmt_macros" }
|
||||
rustc_errors = { path = "../librustc_errors" }
|
||||
errors = { path = "../librustc_errors", package = "rustc_errors" }
|
||||
syntax = { path = "../libsyntax" }
|
||||
syntax_pos = { path = "../libsyntax_pos" }
|
||||
rustc_data_structures = { path = "../librustc_data_structures" }
|
||||
|
@ -4,7 +4,7 @@ use State::*;
|
||||
|
||||
use rustc_data_structures::thin_vec::ThinVec;
|
||||
|
||||
use crate::errors::DiagnosticBuilder;
|
||||
use errors::DiagnosticBuilder;
|
||||
|
||||
use syntax::ast;
|
||||
use syntax::ext::base::{self, *};
|
||||
|
@ -1,4 +1,4 @@
|
||||
use crate::errors::DiagnosticBuilder;
|
||||
use errors::DiagnosticBuilder;
|
||||
|
||||
use syntax::ast::{self, *};
|
||||
use syntax::source_map::Spanned;
|
||||
|
@ -2,7 +2,7 @@
|
||||
/// a literal `true` or `false` based on whether the given cfg matches the
|
||||
/// current compilation environment.
|
||||
|
||||
use crate::errors::DiagnosticBuilder;
|
||||
use errors::DiagnosticBuilder;
|
||||
|
||||
use syntax::ast;
|
||||
use syntax::ext::base::{self, *};
|
||||
|
@ -1,4 +1,4 @@
|
||||
use crate::errors::FatalError;
|
||||
use errors::FatalError;
|
||||
use crate::proc_macro_impl::EXEC_STRATEGY;
|
||||
use crate::proc_macro_server;
|
||||
|
||||
|
@ -3,8 +3,8 @@ use Position::*;
|
||||
|
||||
use fmt_macros as parse;
|
||||
|
||||
use crate::errors::DiagnosticBuilder;
|
||||
use crate::errors::Applicability;
|
||||
use errors::DiagnosticBuilder;
|
||||
use errors::Applicability;
|
||||
|
||||
use syntax::ast;
|
||||
use syntax::ext::base::{self, *};
|
||||
|
@ -8,7 +8,7 @@
|
||||
/// LLVM's `module asm "some assembly here"`. All of LLVM's caveats
|
||||
/// therefore apply.
|
||||
|
||||
use crate::errors::DiagnosticBuilder;
|
||||
use errors::DiagnosticBuilder;
|
||||
|
||||
use syntax::ast;
|
||||
use syntax::source_map::respan;
|
||||
|
@ -17,8 +17,6 @@
|
||||
|
||||
extern crate proc_macro;
|
||||
|
||||
use rustc_errors as errors;
|
||||
|
||||
mod diagnostics;
|
||||
|
||||
mod asm;
|
||||
|
@ -1,7 +1,6 @@
|
||||
use std::mem;
|
||||
|
||||
use crate::deriving;
|
||||
use crate::errors;
|
||||
|
||||
use syntax::ast::{self, Ident};
|
||||
use syntax::attr;
|
||||
|
@ -1,4 +1,4 @@
|
||||
use crate::errors::FatalError;
|
||||
use errors::FatalError;
|
||||
use crate::proc_macro_server;
|
||||
|
||||
use syntax::source_map::Span;
|
||||
|
@ -1,4 +1,4 @@
|
||||
use crate::errors::{self, Diagnostic, DiagnosticBuilder};
|
||||
use errors::{Diagnostic, DiagnosticBuilder};
|
||||
|
||||
use std::panic;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user