remove rustc_error_codes deps except in rustc_driver

This commit is contained in:
Mazdak Farrokhzad 2020-01-18 21:53:53 +01:00
parent 779f85bac6
commit de6046fa0f
109 changed files with 3 additions and 194 deletions

View File

@ -3092,7 +3092,6 @@ dependencies = [
"rustc-rayon-core",
"rustc_apfloat",
"rustc_data_structures",
"rustc_error_codes",
"rustc_errors",
"rustc_feature",
"rustc_hir",
@ -3358,7 +3357,6 @@ dependencies = [
"log",
"rustc",
"rustc_data_structures",
"rustc_error_codes",
"rustc_errors",
"rustc_hir",
"rustc_index",
@ -3375,7 +3373,6 @@ version = "0.0.0"
dependencies = [
"log",
"rustc_data_structures",
"rustc_error_codes",
"rustc_errors",
"rustc_feature",
"rustc_parse",
@ -3391,7 +3388,6 @@ dependencies = [
"fmt_macros",
"log",
"rustc_data_structures",
"rustc_error_codes",
"rustc_errors",
"rustc_expand",
"rustc_feature",
@ -3445,7 +3441,6 @@ dependencies = [
"rustc_apfloat",
"rustc_codegen_utils",
"rustc_data_structures",
"rustc_error_codes",
"rustc_errors",
"rustc_fs_util",
"rustc_hir",
@ -3675,7 +3670,6 @@ dependencies = [
"log",
"rustc",
"rustc_data_structures",
"rustc_error_codes",
"rustc_errors",
"rustc_feature",
"rustc_hir",
@ -3716,7 +3710,6 @@ dependencies = [
"memmap",
"rustc",
"rustc_data_structures",
"rustc_error_codes",
"rustc_errors",
"rustc_expand",
"rustc_hir",
@ -3744,7 +3737,6 @@ dependencies = [
"rustc",
"rustc_apfloat",
"rustc_data_structures",
"rustc_error_codes",
"rustc_errors",
"rustc_hir",
"rustc_index",
@ -3767,7 +3759,6 @@ dependencies = [
"rustc",
"rustc_apfloat",
"rustc_data_structures",
"rustc_error_codes",
"rustc_errors",
"rustc_hir",
"rustc_index",
@ -3786,7 +3777,6 @@ dependencies = [
"bitflags",
"log",
"rustc_data_structures",
"rustc_error_codes",
"rustc_errors",
"rustc_feature",
"rustc_lexer",
@ -3804,7 +3794,6 @@ dependencies = [
"log",
"rustc",
"rustc_data_structures",
"rustc_error_codes",
"rustc_errors",
"rustc_feature",
"rustc_hir",
@ -3820,7 +3809,6 @@ name = "rustc_plugin_impl"
version = "0.0.0"
dependencies = [
"rustc",
"rustc_error_codes",
"rustc_errors",
"rustc_hir",
"rustc_lint",
@ -3836,7 +3824,6 @@ dependencies = [
"log",
"rustc",
"rustc_data_structures",
"rustc_error_codes",
"rustc_errors",
"rustc_hir",
"rustc_span",
@ -3854,7 +3841,6 @@ dependencies = [
"rustc",
"rustc_ast_lowering",
"rustc_data_structures",
"rustc_error_codes",
"rustc_errors",
"rustc_expand",
"rustc_feature",
@ -3890,7 +3876,6 @@ dependencies = [
"log",
"num_cpus",
"rustc_data_structures",
"rustc_error_codes",
"rustc_errors",
"rustc_feature",
"rustc_fs_util",
@ -3973,7 +3958,6 @@ dependencies = [
"log",
"rustc",
"rustc_data_structures",
"rustc_error_codes",
"rustc_errors",
"rustc_hir",
"rustc_index",
@ -4493,7 +4477,6 @@ version = "0.0.0"
dependencies = [
"log",
"rustc_data_structures",
"rustc_error_codes",
"rustc_errors",
"rustc_feature",
"rustc_index",

View File

@ -37,5 +37,4 @@ byteorder = { version = "1.3" }
chalk-engine = { version = "0.9.0", default-features=false }
smallvec = { version = "1.0", features = ["union", "may_dangle"] }
measureme = "0.7.1"
rustc_error_codes = { path = "../librustc_error_codes" }
rustc_session = { path = "../librustc_session" }

View File

@ -8,7 +8,6 @@ use crate::hir::map::Map;
use crate::ty::query::Providers;
use crate::ty::TyCtxt;
use rustc_error_codes::*;
use rustc_errors::struct_span_err;
use rustc_hir as hir;
use rustc_hir::def_id::DefId;

View File

@ -65,7 +65,6 @@ use crate::ty::{
Region, Ty, TyCtxt, TypeFoldable,
};
use rustc_data_structures::fx::{FxHashMap, FxHashSet};
use rustc_error_codes::*;
use rustc_errors::{pluralize, struct_span_err};
use rustc_errors::{Applicability, DiagnosticBuilder, DiagnosticStyledString};
use rustc_hir as hir;

View File

@ -13,8 +13,6 @@ use rustc_span::symbol::kw;
use rustc_span::Span;
use std::borrow::Cow;
use rustc_error_codes::*;
struct FindLocalByTypeVisitor<'a, 'tcx> {
infcx: &'a InferCtxt<'a, 'tcx>,
target_ty: Ty<'tcx>,

View File

@ -5,7 +5,6 @@ use crate::infer::error_reporting::nice_region_error::util::AnonymousParamInfo;
use crate::infer::error_reporting::nice_region_error::NiceRegionError;
use crate::util::common::ErrorReported;
use rustc_error_codes::*;
use rustc_errors::struct_span_err;
impl<'a, 'tcx> NiceRegionError<'a, 'tcx> {

View File

@ -5,8 +5,6 @@ use crate::ty;
use rustc_errors::{struct_span_err, Applicability, DiagnosticBuilder};
use rustc_hir::{FunctionRetTy, TyKind};
use rustc_error_codes::*;
impl<'a, 'tcx> NiceRegionError<'a, 'tcx> {
/// When given a `ConcreteFailure` for a function with parameters containing a named region and
/// an anonymous region, emit an descriptive diagnostic error.

View File

@ -5,8 +5,6 @@ use crate::ty::error::TypeError;
use crate::ty::{self, Region};
use rustc_errors::{struct_span_err, DiagnosticBuilder};
use rustc_error_codes::*;
impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
pub(super) fn note_region_origin(
&self,

View File

@ -15,8 +15,6 @@ use rustc_hir::def_id::{DefId, DefIdMap};
use rustc_hir::Node;
use rustc_span::Span;
use rustc_error_codes::*;
pub type OpaqueTypeMap<'tcx> = DefIdMap<OpaqueTypeDecl<'tcx>>;
/// Information about the opaque types whose values we

View File

@ -24,8 +24,6 @@ use rustc_span::symbol::{sym, Symbol};
use rustc_span::Span;
use syntax::ast;
use rustc_error_codes::*;
// The actual lang items defined come at the end of this file in one handy table.
// So you probably just want to nip down to the end.
macro_rules! language_item_table {

View File

@ -15,8 +15,6 @@ use rustc_span::Span;
use rustc_target::spec::PanicStrategy;
use syntax::ast;
use rustc_error_codes::*;
macro_rules! weak_lang_items {
($($name:ident, $item:ident, $sym:ident;)*) => (

View File

@ -16,8 +16,6 @@ use rustc_span::{Pos, Span};
use rustc_target::spec::abi::Abi;
use std::{any::Any, env, fmt};
use rustc_error_codes::*;
#[derive(Debug, Copy, Clone, PartialEq, Eq, HashStable, RustcEncodable, RustcDecodable)]
pub enum ErrorHandled {
/// Already reported a lint or an error for this evaluation.

View File

@ -30,8 +30,6 @@ use rustc_span::{ExpnKind, Span, DUMMY_SP};
use std::fmt;
use syntax::ast;
use rustc_error_codes::*;
impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
pub fn report_fulfillment_errors(
&self,

View File

@ -20,8 +20,6 @@ use rustc_span::symbol::{kw, sym};
use rustc_span::{MultiSpan, Span, DUMMY_SP};
use std::fmt;
use rustc_error_codes::*;
impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
crate fn suggest_restricting_param_bound(
&self,

View File

@ -11,8 +11,6 @@ use rustc_span::Span;
use syntax::ast::{MetaItem, NestedMetaItem};
use syntax::attr;
use rustc_error_codes::*;
#[derive(Clone, Debug)]
pub struct OnUnimplementedFormatString(Symbol);

View File

@ -6,8 +6,6 @@ use crate::ty::{self, Ty, TyCtxt};
use rustc_span::source_map::Span;
use std::iter::FromIterator;
use rustc_error_codes::*;
impl<'cx, 'tcx> At<'cx, 'tcx> {
/// Given a type `ty` of some value being dropped, computes a set
/// of "kinds" (types, regions) that must be outlive the execution

View File

@ -25,8 +25,6 @@ use rustc_span::DUMMY_SP;
use super::util::impl_trait_ref_and_oblig;
use super::{FulfillmentContext, SelectionContext};
use rustc_error_codes::*;
/// Information pertinent to an overlapping impl error.
#[derive(Debug)]
pub struct OverlapError {

View File

@ -25,8 +25,6 @@ use std::hash::{Hash, Hasher};
use std::mem;
use std::ptr;
use rustc_error_codes::*;
pub struct QueryCache<'tcx, D: QueryConfig<'tcx> + ?Sized> {
pub(super) results: FxHashMap<D::Key, QueryValue<D::Value>>,
pub(super) active: FxHashMap<D::Key, QueryResult<'tcx>>,

View File

@ -17,7 +17,6 @@ rustc_target = { path = "../librustc_target" }
rustc_data_structures = { path = "../librustc_data_structures" }
rustc_index = { path = "../librustc_index" }
rustc_span = { path = "../librustc_span" }
rustc_error_codes = { path = "../librustc_error_codes" }
rustc_errors = { path = "../librustc_errors" }
rustc_session = { path = "../librustc_session" }
syntax = { path = "../libsyntax" }

View File

@ -2,7 +2,6 @@ use super::{ImplTraitContext, LoweringContext, ParamMode, ParenthesizedGenericAr
use rustc::bug;
use rustc_data_structures::thin_vec::ThinVec;
use rustc_error_codes::*;
use rustc_errors::struct_span_err;
use rustc_hir as hir;
use rustc_hir::def::Res;

View File

@ -3,7 +3,6 @@ use super::{ImplTraitContext, ImplTraitPosition, ImplTraitTypeIdVisitor};
use rustc::arena::Arena;
use rustc::bug;
use rustc_error_codes::*;
use rustc_errors::struct_span_err;
use rustc_hir as hir;
use rustc_hir::def::{DefKind, Res};

View File

@ -41,7 +41,6 @@ use rustc::{bug, span_bug};
use rustc_data_structures::captures::Captures;
use rustc_data_structures::fx::FxHashSet;
use rustc_data_structures::sync::Lrc;
use rustc_error_codes::*;
use rustc_errors::struct_span_err;
use rustc_hir as hir;
use rustc_hir::def::{DefKind, Namespace, PartialRes, PerNS, Res};

View File

@ -3,7 +3,6 @@ use super::{GenericArgsCtor, ParenthesizedGenericArgs};
use rustc::lint::builtin::ELIDED_LIFETIMES_IN_PATHS;
use rustc::span_bug;
use rustc_error_codes::*;
use rustc_errors::{struct_span_err, Applicability};
use rustc_hir as hir;
use rustc_hir::def::{DefKind, PartialRes, Res};

View File

@ -12,7 +12,6 @@ path = "lib.rs"
log = "0.4"
rustc_data_structures = { path = "../librustc_data_structures" }
rustc_errors = { path = "../librustc_errors" }
rustc_error_codes = { path = "../librustc_error_codes" }
rustc_feature = { path = "../librustc_feature" }
rustc_parse = { path = "../librustc_parse" }
rustc_session = { path = "../librustc_session" }

View File

@ -23,8 +23,6 @@ use syntax::print::pprust;
use syntax::visit::{self, Visitor};
use syntax::walk_list;
use rustc_error_codes::*;
/// A syntactic context that disallows certain kinds of bounds (e.g., `?Trait` or `?const Trait`).
#[derive(Clone, Copy)]
enum BoundContext {

View File

@ -1,4 +1,3 @@
use rustc_error_codes::*;
use rustc_errors::{struct_span_err, Handler};
use rustc_feature::{AttributeGate, BUILTIN_ATTRIBUTE_MAP};
use rustc_feature::{Features, GateIssue, UnstableFeatures};

View File

@ -22,4 +22,3 @@ smallvec = { version = "1.0", features = ["union", "may_dangle"] }
syntax = { path = "../libsyntax" }
rustc_expand = { path = "../librustc_expand" }
rustc_span = { path = "../librustc_span" }
rustc_error_codes = { path = "../librustc_error_codes" }

View File

@ -12,8 +12,6 @@ use syntax::ptr::P;
use syntax::token::{self, Token};
use syntax::tokenstream::{self, TokenStream};
use rustc_error_codes::*;
enum State {
Asm,
Outputs,

View File

@ -9,8 +9,6 @@ use rustc_span::Span;
use syntax::ast::{Expr, MetaItem};
use syntax::ptr::P;
use rustc_error_codes::*;
pub fn expand_deriving_default(
cx: &mut ExtCtxt<'_>,
span: Span,

View File

@ -32,5 +32,4 @@ rustc_hir = { path = "../librustc_hir" }
rustc_incremental = { path = "../librustc_incremental" }
rustc_index = { path = "../librustc_index" }
rustc_target = { path = "../librustc_target" }
rustc_error_codes = { path = "../librustc_error_codes" }
rustc_session = { path = "../librustc_session" }

View File

@ -13,8 +13,6 @@ use rustc_hir::def_id::DefId;
use crate::traits::BuilderMethods;
use rustc_hir as hir;
use rustc_error_codes::*;
pub enum IntPredicate {
IntEQ,
IntNE,

View File

@ -7,8 +7,6 @@ use super::OperandValue;
use crate::traits::BuilderMethods;
use crate::traits::*;
use rustc_error_codes::*;
impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
pub fn codegen_statement(&mut self, mut bx: Bx, statement: &mir::Statement<'tcx>) -> Bx {
debug!("codegen_statement(statement={:?})", statement);

View File

@ -6,16 +6,8 @@ macro_rules! register_diagnostics {
pub static DIAGNOSTICS: &[(&str, &str)] = &[
$( (stringify!($ecode), $message), )*
];
$(
pub const $ecode: () = ();
)*
$(
pub const $code: () = ();
)*
)
}
mod error_codes;
pub use error_codes::*;
pub use error_codes::DIAGNOSTICS;

View File

@ -399,8 +399,5 @@ macro_rules! struct_span_err {
#[macro_export]
macro_rules! error_code {
($code:ident) => {{
let _ = $code;
$crate::DiagnosticId::Error(stringify!($code).to_owned())
}};
($code:ident) => {{ $crate::DiagnosticId::Error(stringify!($code).to_owned()) }};
}

View File

@ -13,7 +13,6 @@ log = "0.4"
unicode-security = "0.0.2"
rustc = { path = "../librustc" }
rustc_errors = { path = "../librustc_errors" }
rustc_error_codes = { path = "../librustc_error_codes" }
rustc_hir = { path = "../librustc_hir" }
rustc_target = { path = "../librustc_target" }
syntax = { path = "../libsyntax" }

View File

@ -26,7 +26,6 @@ use rustc::ty::layout::{LayoutError, LayoutOf, TyLayout};
use rustc::ty::{self, print::Printer, subst::GenericArg, Ty, TyCtxt};
use rustc_data_structures::fx::FxHashMap;
use rustc_data_structures::sync;
use rustc_error_codes::*;
use rustc_errors::{struct_span_err, Applicability, DiagnosticBuilder};
use rustc_hir as hir;
use rustc_hir::def_id::{CrateNum, DefId};

View File

@ -6,7 +6,6 @@ use rustc::lint::{LintLevelMap, LintLevelSets, LintSet, LintSource};
use rustc::ty::query::Providers;
use rustc::ty::TyCtxt;
use rustc_data_structures::fx::FxHashMap;
use rustc_error_codes::*;
use rustc_errors::{struct_span_err, Applicability, DiagnosticBuilder};
use rustc_hir as hir;
use rustc_hir::def_id::{CrateNum, LOCAL_CRATE};

View File

@ -26,7 +26,6 @@ syntax = { path = "../libsyntax" }
rustc_expand = { path = "../librustc_expand" }
rustc_parse = { path = "../librustc_parse" }
rustc_span = { path = "../librustc_span" }
rustc_error_codes = { path = "../librustc_error_codes" }
[target.'cfg(windows)'.dependencies]
winapi = { version = "0.3", features = ["errhandlingapi", "libloaderapi"] }

View File

@ -12,7 +12,6 @@ use rustc::session::{CrateDisambiguator, Session};
use rustc::ty::TyCtxt;
use rustc_data_structures::svh::Svh;
use rustc_data_structures::sync::Lrc;
use rustc_error_codes::*;
use rustc_errors::struct_span_err;
use rustc_expand::base::SyntaxExtension;
use rustc_hir::def_id::{CrateNum, LOCAL_CRATE};

View File

@ -241,8 +241,6 @@ use rustc_data_structures::owning_ref::OwningRef;
use log::{debug, info, warn};
use rustc_error_codes::*;
#[derive(Clone)]
struct CrateMismatch {
path: PathBuf,

View File

@ -3,7 +3,6 @@ use rustc::session::parse::feature_err;
use rustc::session::Session;
use rustc::ty::TyCtxt;
use rustc_data_structures::fx::FxHashSet;
use rustc_error_codes::*;
use rustc_errors::struct_span_err;
use rustc_hir as hir;
use rustc_hir::itemlikevisit::ItemLikeVisitor;

View File

@ -29,4 +29,3 @@ syntax = { path = "../libsyntax" }
rustc_span = { path = "../librustc_span" }
rustc_apfloat = { path = "../librustc_apfloat" }
smallvec = { version = "1.0", features = ["union", "may_dangle"] }
rustc_error_codes = { path = "../librustc_error_codes" }

View File

@ -27,7 +27,6 @@ use rustc::ty::{
TyCtxt, UserType, UserTypeAnnotationIndex,
};
use rustc_data_structures::fx::{FxHashMap, FxHashSet};
use rustc_error_codes::*;
use rustc_errors::struct_span_err;
use rustc_hir as hir;
use rustc_hir::def_id::DefId;

View File

@ -10,8 +10,6 @@ use rustc_span::{Span, Symbol};
use super::{ConstKind, Item};
use rustc_error_codes::*;
/// An operation that is not *always* allowed in a const context.
pub trait NonConstOp: std::fmt::Debug {
/// Whether this operation can be evaluated by miri.

View File

@ -6,7 +6,6 @@ use rustc::mir::*;
use rustc::traits::{self, TraitEngine};
use rustc::ty::cast::CastTy;
use rustc::ty::{self, TyCtxt};
use rustc_error_codes::*;
use rustc_errors::struct_span_err;
use rustc_hir::{def_id::DefId, HirId};
use rustc_index::bit_set::BitSet;

View File

@ -18,8 +18,6 @@ use std::ops::Bound;
use crate::const_eval::{is_const_fn, is_min_const_fn};
use crate::util;
use rustc_error_codes::*;
pub struct UnsafetyChecker<'a, 'tcx> {
body: &'a Body<'tcx>,
const_context: bool,

View File

@ -1,5 +1,4 @@
use rustc::ty::{self, Ty, TyCtxt};
use rustc_error_codes::*;
use rustc_errors::{struct_span_err, DiagnosticBuilder, DiagnosticId};
use rustc_span::{MultiSpan, Span};

View File

@ -25,4 +25,3 @@ rustc_span = { path = "../librustc_span" }
rustc_target = { path = "../librustc_target" }
syntax = { path = "../libsyntax" }
smallvec = { version = "1.0", features = ["union", "may_dangle"] }
rustc_error_codes = { path = "../librustc_error_codes" }

View File

@ -9,7 +9,6 @@ use rustc::lint;
use rustc::session::parse::feature_err;
use rustc::session::Session;
use rustc::ty::{self, Ty, TyCtxt};
use rustc_error_codes::*;
use rustc_errors::{error_code, struct_span_err, Applicability, DiagnosticBuilder};
use rustc_hir as hir;
use rustc_hir::def::*;

View File

@ -28,8 +28,6 @@ use syntax::ast;
use std::cmp::Ordering;
use std::fmt;
use rustc_error_codes::*;
#[derive(Clone, Debug)]
crate enum PatternError {
AssocConstInPattern(Span),

View File

@ -16,7 +16,6 @@ rustc_data_structures = { path = "../librustc_data_structures" }
rustc_feature = { path = "../librustc_feature" }
rustc_lexer = { path = "../librustc_lexer" }
rustc_errors = { path = "../librustc_errors" }
rustc_error_codes = { path = "../librustc_error_codes" }
smallvec = { version = "1.0", features = ["union", "may_dangle"] }
rustc_session = { path = "../librustc_session" }
rustc_span = { path = "../librustc_span" }

View File

@ -10,7 +10,6 @@
use crate::{parse_in, validate_attr};
use rustc_data_structures::fx::FxHashMap;
use rustc_error_codes::*;
use rustc_errors::{error_code, struct_span_err, Applicability, Handler};
use rustc_feature::{Feature, Features, State as FeatureState};
use rustc_feature::{

View File

@ -1,7 +1,6 @@
use super::{BlockMode, Parser, PathStyle, SemiColonMode, SeqSep, TokenExpectType, TokenType};
use rustc_data_structures::fx::FxHashSet;
use rustc_error_codes::*;
use rustc_errors::{pluralize, struct_span_err};
use rustc_errors::{Applicability, DiagnosticBuilder, Handler, PResult};
use rustc_span::source_map::Spanned;

View File

@ -3,7 +3,6 @@ use super::{FollowedByType, Parser, PathStyle};
use crate::maybe_whole;
use rustc_error_codes::*;
use rustc_errors::{struct_span_err, Applicability, DiagnosticBuilder, PResult, StashKey};
use rustc_span::source_map::{self, respan, Span, Spanned};
use rustc_span::symbol::{kw, sym, Symbol};

View File

@ -33,8 +33,6 @@ use std::borrow::Cow;
use std::path::PathBuf;
use std::{cmp, mem, slice};
use rustc_error_codes::*;
bitflags::bitflags! {
struct Restrictions: u8 {
const STMT_EXPR = 1 << 0;

View File

@ -659,7 +659,6 @@ impl<'a> Parser<'a> {
}
pub(super) fn error_inclusive_range_with_no_end(&self, span: Span) {
use rustc_error_codes::E0586;
struct_span_err!(self.sess.span_diagnostic, span, E0586, "inclusive range with no end")
.span_suggestion_short(
span,

View File

@ -3,7 +3,6 @@ use super::{Parser, PathStyle, PrevTokenKind, TokenType};
use crate::{maybe_recover_from_interpolated_ty_qpath, maybe_whole};
use rustc_error_codes::*;
use rustc_errors::{pluralize, struct_span_err, Applicability, PResult};
use rustc_span::source_map::Span;
use rustc_span::symbol::{kw, sym};

View File

@ -20,4 +20,3 @@ rustc_session = { path = "../librustc_session" }
rustc_target = { path = "../librustc_target" }
syntax = { path = "../libsyntax" }
rustc_span = { path = "../librustc_span" }
rustc_error_codes = { path = "../librustc_error_codes" }

View File

@ -12,7 +12,6 @@ use rustc::session::config::nightly_options;
use rustc::session::parse::feature_err;
use rustc::ty::query::Providers;
use rustc::ty::TyCtxt;
use rustc_error_codes::*;
use rustc_errors::struct_span_err;
use rustc_hir as hir;
use rustc_hir::def_id::DefId;

View File

@ -12,8 +12,6 @@ use rustc_span::{Span, DUMMY_SP};
use syntax::attr;
use syntax::entry::EntryPointType;
use rustc_error_codes::*;
struct EntryContext<'a, 'tcx> {
session: &'a Session,

View File

@ -11,8 +11,6 @@ use rustc_index::vec::Idx;
use rustc_span::{sym, Span};
use rustc_target::spec::abi::Abi::RustIntrinsic;
use rustc_error_codes::*;
fn check_mod_intrinsics(tcx: TyCtxt<'_>, module_def_id: DefId) {
tcx.hir().visit_item_likes_in_module(module_def_id, &mut ItemVisitor { tcx }.as_deep_visitor());
}

View File

@ -15,8 +15,6 @@ use rustc_span::symbol::Symbol;
use rustc_span::{sym, Span};
use syntax::ast::{Attribute, MetaItem, MetaItemKind};
use rustc_error_codes::*;
fn new_lib_features() -> LibFeatures {
LibFeatures { stable: Default::default(), unstable: Default::default() }
}

View File

@ -1,7 +1,5 @@
use Context::*;
use rustc::session::Session;
use rustc::hir::map::Map;
use rustc::ty::query::Providers;
use rustc::ty::TyCtxt;
@ -10,10 +8,9 @@ use rustc_hir as hir;
use rustc_hir::def_id::DefId;
use rustc_hir::intravisit::{self, NestedVisitorMap, Visitor};
use rustc_hir::{Destination, Movability, Node};
use rustc_session::Session;
use rustc_span::Span;
use rustc_error_codes::*;
#[derive(Clone, Copy, Debug, PartialEq)]
enum Context {
Normal,

View File

@ -26,8 +26,6 @@ use std::cmp::Ordering;
use std::mem::replace;
use std::num::NonZeroU32;
use rustc_error_codes::*;
#[derive(PartialEq)]
enum AnnotationKind {
// Annotation is required if not inherited from unstable parents

View File

@ -18,4 +18,3 @@ rustc_lint = { path = "../librustc_lint" }
rustc_metadata = { path = "../librustc_metadata" }
syntax = { path = "../libsyntax" }
rustc_span = { path = "../librustc_span" }
rustc_error_codes = { path = "../librustc_error_codes" }

View File

@ -3,7 +3,6 @@
use crate::Registry;
use rustc::middle::cstore::MetadataLoader;
use rustc::session::Session;
use rustc_error_codes::*;
use rustc_errors::struct_span_err;
use rustc_metadata::locator;
use rustc_span::symbol::sym;

View File

@ -16,5 +16,4 @@ rustc_typeck = { path = "../librustc_typeck" }
syntax = { path = "../libsyntax" }
rustc_span = { path = "../librustc_span" }
rustc_data_structures = { path = "../librustc_data_structures" }
rustc_error_codes = { path = "../librustc_error_codes" }
log = "0.4"

View File

@ -27,8 +27,6 @@ use syntax::attr;
use std::marker::PhantomData;
use std::{cmp, fmt, mem};
use rustc_error_codes::*;
////////////////////////////////////////////////////////////////////////////////
/// Generic infrastructure used to implement specific visitors below.
////////////////////////////////////////////////////////////////////////////////

View File

@ -23,7 +23,6 @@ rustc_expand = { path = "../librustc_expand" }
rustc_feature = { path = "../librustc_feature" }
rustc_hir = { path = "../librustc_hir" }
rustc_metadata = { path = "../librustc_metadata" }
rustc_error_codes = { path = "../librustc_error_codes" }
rustc_session = { path = "../librustc_session" }
rustc_span = { path = "../librustc_span" }
smallvec = { version = "1.0", features = ["union", "may_dangle"] }

View File

@ -21,7 +21,6 @@ use rustc::hir::exports::Export;
use rustc::middle::cstore::CrateStore;
use rustc::ty;
use rustc_data_structures::sync::Lrc;
use rustc_error_codes::*;
use rustc_errors::{struct_span_err, Applicability};
use rustc_expand::base::SyntaxExtension;
use rustc_expand::expand::AstFragment;

View File

@ -25,8 +25,6 @@ use crate::{BindingError, CrateLint, HasGenericParams, LegacyScope, Module, Modu
use crate::{NameBinding, NameBindingKind, PrivacyError, VisResolutionError};
use crate::{ParentScope, PathResult, ResolutionError, Resolver, Scope, ScopeSet, Segment};
use rustc_error_codes::*;
type Res = def::Res<ast::NodeId>;
/// A vector of spans and replacements, a message and applicability.

View File

@ -29,8 +29,6 @@ use syntax::ast::{Ident, Name, NodeId};
use syntax::unwrap_or;
use syntax::util::lev_distance::find_best_match_for_name;
use rustc_error_codes::*;
use log::*;
use std::cell::Cell;

View File

@ -31,8 +31,6 @@ use log::debug;
use std::collections::BTreeSet;
use std::mem::replace;
use rustc_error_codes::*;
mod diagnostics;
type Res = def::Res<NodeId>;

View File

@ -6,7 +6,6 @@ use crate::{PathResult, PathSource, Segment};
use rustc::session::config::nightly_options;
use rustc_data_structures::fx::FxHashSet;
use rustc_error_codes::*;
use rustc_errors::{Applicability, DiagnosticBuilder};
use rustc_hir::def::Namespace::{self, *};
use rustc_hir::def::{self, CtorKind, DefKind};

View File

@ -61,8 +61,6 @@ use imports::{ImportDirective, ImportDirectiveSubclass, ImportResolver, NameReso
use late::{HasGenericParams, PathSource, Rib, RibKind::*};
use macros::{LegacyBinding, LegacyScope};
use rustc_error_codes::*;
type Res = def::Res<NodeId>;
mod build_reduced_graph;

View File

@ -30,8 +30,6 @@ use syntax::walk_list;
use log::debug;
use rustc_error_codes::*;
// This counts the no of times a lifetime is used
#[derive(Clone, Copy, Debug)]
pub enum LifetimeUseSet<'tcx> {

View File

@ -10,7 +10,6 @@ path = "lib.rs"
[dependencies]
log = "0.4"
rustc_error_codes = { path = "../librustc_error_codes" }
rustc_errors = { path = "../librustc_errors" }
rustc_feature = { path = "../librustc_feature" }
rustc_target = { path = "../librustc_target" }

View File

@ -6,7 +6,6 @@ use crate::node_id::NodeId;
use rustc_data_structures::fx::{FxHashMap, FxHashSet};
use rustc_data_structures::sync::{Lock, Lrc, Once};
use rustc_error_codes::E0658;
use rustc_errors::{emitter::SilentEmitter, ColorConfig, Handler};
use rustc_errors::{error_code, Applicability, DiagnosticBuilder};
use rustc_feature::{find_feature_issue, GateIssue, UnstableFeatures};

View File

@ -22,4 +22,3 @@ smallvec = { version = "1.0", features = ["union", "may_dangle"] }
syntax = { path = "../libsyntax" }
rustc_span = { path = "../librustc_span" }
rustc_index = { path = "../librustc_index" }
rustc_error_codes = { path = "../librustc_error_codes" }

View File

@ -39,7 +39,6 @@ use std::iter;
use std::slice;
use rustc::mir::interpret::LitToConstInput;
use rustc_error_codes::*;
#[derive(Debug)]
pub struct PathSeg(pub DefId, pub usize);

View File

@ -13,8 +13,6 @@ use rustc_hir as hir;
use rustc_span::Span;
use syntax::ast::Ident;
use rustc_error_codes::*;
use std::iter;
#[derive(Copy, Clone, Debug)]

View File

@ -8,7 +8,6 @@ use rustc::ty::adjustment::{Adjust, Adjustment, AllowTwoPhase, AutoBorrow, AutoB
use rustc::ty::subst::SubstsRef;
use rustc::ty::{self, Ty, TyCtxt, TypeFoldable};
use rustc::{infer, traits};
use rustc_error_codes::*;
use rustc_errors::{struct_span_err, Applicability, DiagnosticBuilder};
use rustc_hir as hir;
use rustc_hir::def::Res;

View File

@ -49,8 +49,6 @@ use rustc_hir as hir;
use rustc_span::Span;
use syntax::ast;
use rustc_error_codes::*;
/// Reifies a cast check to be checked once we have full type information for
/// a function context.
pub struct CastCheck<'tcx> {

View File

@ -65,7 +65,6 @@ use rustc::ty::fold::TypeFoldable;
use rustc::ty::relate::RelateResult;
use rustc::ty::subst::SubstsRef;
use rustc::ty::{self, Ty, TypeAndMut};
use rustc_error_codes::*;
use rustc_errors::{struct_span_err, DiagnosticBuilder};
use rustc_hir as hir;
use rustc_hir::def_id::DefId;

View File

@ -15,8 +15,6 @@ use rustc_span::Span;
use super::{potentially_plural_count, FnCtxt, Inherited};
use rustc_error_codes::*;
/// Checks that a method from an impl conforms to the signature of
/// the same method as declared in the trait.
///

View File

@ -14,8 +14,6 @@ use rustc_errors::struct_span_err;
use rustc_span::Span;
use rustc_error_codes::*;
/// This function confirms that the `Drop` implementation identified by
/// `drop_impl_did` is not any more specialized than the type it is
/// attached to (Issue #8142).

View File

@ -38,8 +38,6 @@ use rustc_span::symbol::{kw, sym, Symbol};
use syntax::ast;
use syntax::util::lev_distance::find_best_match_for_name;
use rustc_error_codes::*;
use std::fmt::Display;
impl<'a, 'tcx> FnCtxt<'a, 'tcx> {

View File

@ -6,7 +6,6 @@ use crate::require_same_types;
use rustc::traits::{ObligationCause, ObligationCauseCode};
use rustc::ty::subst::Subst;
use rustc::ty::{self, Ty, TyCtxt};
use rustc_error_codes::*;
use rustc_errors::struct_span_err;
use rustc_hir as hir;
use rustc_span::symbol::Symbol;

View File

@ -38,8 +38,6 @@ use std::ops::Deref;
use syntax::ast;
use syntax::util::lev_distance::{find_best_match_for_name, lev_distance};
use rustc_error_codes::*;
use smallvec::{smallvec, SmallVec};
use self::CandidateKind::*;

View File

@ -21,8 +21,6 @@ use rustc_span::{source_map, FileName, Span};
use syntax::ast;
use syntax::util::lev_distance;
use rustc_error_codes::*;
use std::cmp::Ordering;
use super::probe::Mode;

View File

@ -133,8 +133,6 @@ use syntax::ast;
use syntax::attr;
use syntax::util::parser::ExprPrecedence;
use rustc_error_codes::*;
use std::cell::{Cell, Ref, RefCell, RefMut};
use std::cmp;
use std::collections::hash_map::Entry;

View File

@ -11,8 +11,6 @@ use rustc_hir as hir;
use rustc_span::Span;
use syntax::ast::Ident;
use rustc_error_codes::*;
impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
/// Checks a `a <op>= b`
pub fn check_binop_assign(

View File

@ -15,8 +15,6 @@ use rustc_span::Span;
use syntax::ast;
use syntax::util::lev_distance::find_best_match_for_name;
use rustc_error_codes::*;
use std::cmp;
use std::collections::hash_map::Entry::{Occupied, Vacant};

View File

@ -18,8 +18,6 @@ use syntax::ast;
use rustc_hir as hir;
use rustc_hir::itemlikevisit::ParItemLikeVisitor;
use rustc_error_codes::*;
/// Helper type of a temporary returned by `.for_item(...)`.
/// This is necessary because we can't write the following bound:
///

View File

@ -12,7 +12,6 @@ use rustc::traits::{self, ObligationCause, TraitEngine};
use rustc::ty::adjustment::CoerceUnsizedInfo;
use rustc::ty::TypeFoldable;
use rustc::ty::{self, Ty, TyCtxt};
use rustc_error_codes::*;
use rustc_errors::struct_span_err;
use rustc_hir as hir;
use rustc_hir::def_id::DefId;

View File

@ -16,8 +16,6 @@ use rustc_hir::itemlikevisit::ItemLikeVisitor;
use rustc_span::Span;
use syntax::ast;
use rustc_error_codes::*;
/// On-demand query: yields a map containing all types mapped to their inherent impls.
pub fn crate_inherent_impls(tcx: TyCtxt<'_>, crate_num: CrateNum) -> &CrateInherentImpls {
assert_eq!(crate_num, LOCAL_CRATE);

View File

@ -6,8 +6,6 @@ use rustc_hir as hir;
use rustc_hir::def_id::{CrateNum, DefId, LOCAL_CRATE};
use rustc_hir::itemlikevisit::ItemLikeVisitor;
use rustc_error_codes::*;
pub fn crate_inherent_impls_overlap_check(tcx: TyCtxt<'_>, crate_num: CrateNum) {
assert_eq!(crate_num, LOCAL_CRATE);
let krate = tcx.hir().krate();

View File

@ -8,7 +8,6 @@
use rustc::traits;
use rustc::ty::query::Providers;
use rustc::ty::{self, TyCtxt, TypeFoldable};
use rustc_error_codes::*;
use rustc_errors::struct_span_err;
use rustc_hir::def_id::{DefId, LOCAL_CRATE};
use rustc_hir::HirId;

View File

@ -7,8 +7,6 @@ use rustc_errors::struct_span_err;
use rustc_hir as hir;
use rustc_hir::itemlikevisit::ItemLikeVisitor;
use rustc_error_codes::*;
pub fn check(tcx: TyCtxt<'_>) {
let mut orphan = OrphanChecker { tcx };
tcx.hir().krate().visit_all_item_likes(&mut orphan);

View File

@ -7,8 +7,6 @@ use rustc_hir as hir;
use rustc_hir::itemlikevisit::ItemLikeVisitor;
use rustc_hir::Unsafety;
use rustc_error_codes::*;
pub fn check(tcx: TyCtxt<'_>) {
let mut unsafety = UnsafetyChecker { tcx };
tcx.hir().krate().visit_all_item_likes(&mut unsafety);

Some files were not shown because too many files have changed in this diff Show More