Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove rustc_error_codes deps except in rustc_driver #68353

Merged
merged 1 commit into from
Jan 20, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 0 additions & 17 deletions Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3092,7 +3092,6 @@ dependencies = [
"rustc-rayon-core",
"rustc_apfloat",
"rustc_data_structures",
"rustc_error_codes",
"rustc_errors",
"rustc_feature",
"rustc_hir",
Expand Down Expand Up @@ -3358,7 +3357,6 @@ dependencies = [
"log",
"rustc",
"rustc_data_structures",
"rustc_error_codes",
"rustc_errors",
"rustc_hir",
"rustc_index",
Expand All @@ -3375,7 +3373,6 @@ version = "0.0.0"
dependencies = [
"log",
"rustc_data_structures",
"rustc_error_codes",
"rustc_errors",
"rustc_feature",
"rustc_parse",
Expand All @@ -3391,7 +3388,6 @@ dependencies = [
"fmt_macros",
"log",
"rustc_data_structures",
"rustc_error_codes",
"rustc_errors",
"rustc_expand",
"rustc_feature",
Expand Down Expand Up @@ -3445,7 +3441,6 @@ dependencies = [
"rustc_apfloat",
"rustc_codegen_utils",
"rustc_data_structures",
"rustc_error_codes",
"rustc_errors",
"rustc_fs_util",
"rustc_hir",
Expand Down Expand Up @@ -3675,7 +3670,6 @@ dependencies = [
"log",
"rustc",
"rustc_data_structures",
"rustc_error_codes",
"rustc_errors",
"rustc_feature",
"rustc_hir",
Expand Down Expand Up @@ -3716,7 +3710,6 @@ dependencies = [
"memmap",
"rustc",
"rustc_data_structures",
"rustc_error_codes",
"rustc_errors",
"rustc_expand",
"rustc_hir",
Expand Down Expand Up @@ -3744,7 +3737,6 @@ dependencies = [
"rustc",
"rustc_apfloat",
"rustc_data_structures",
"rustc_error_codes",
"rustc_errors",
"rustc_hir",
"rustc_index",
Expand All @@ -3767,7 +3759,6 @@ dependencies = [
"rustc",
"rustc_apfloat",
"rustc_data_structures",
"rustc_error_codes",
"rustc_errors",
"rustc_hir",
"rustc_index",
Expand All @@ -3786,7 +3777,6 @@ dependencies = [
"bitflags",
"log",
"rustc_data_structures",
"rustc_error_codes",
"rustc_errors",
"rustc_feature",
"rustc_lexer",
Expand All @@ -3804,7 +3794,6 @@ dependencies = [
"log",
"rustc",
"rustc_data_structures",
"rustc_error_codes",
"rustc_errors",
"rustc_feature",
"rustc_hir",
Expand All @@ -3820,7 +3809,6 @@ name = "rustc_plugin_impl"
version = "0.0.0"
dependencies = [
"rustc",
"rustc_error_codes",
"rustc_errors",
"rustc_hir",
"rustc_lint",
Expand All @@ -3836,7 +3824,6 @@ dependencies = [
"log",
"rustc",
"rustc_data_structures",
"rustc_error_codes",
"rustc_errors",
"rustc_hir",
"rustc_span",
Expand All @@ -3854,7 +3841,6 @@ dependencies = [
"rustc",
"rustc_ast_lowering",
"rustc_data_structures",
"rustc_error_codes",
"rustc_errors",
"rustc_expand",
"rustc_feature",
Expand Down Expand Up @@ -3890,7 +3876,6 @@ dependencies = [
"log",
"num_cpus",
"rustc_data_structures",
"rustc_error_codes",
"rustc_errors",
"rustc_feature",
"rustc_fs_util",
Expand Down Expand Up @@ -3973,7 +3958,6 @@ dependencies = [
"log",
"rustc",
"rustc_data_structures",
"rustc_error_codes",
"rustc_errors",
"rustc_hir",
"rustc_index",
Expand Down Expand Up @@ -4493,7 +4477,6 @@ version = "0.0.0"
dependencies = [
"log",
"rustc_data_structures",
"rustc_error_codes",
"rustc_errors",
"rustc_feature",
"rustc_index",
Expand Down
1 change: 0 additions & 1 deletion src/librustc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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" }
1 change: 0 additions & 1 deletion src/librustc/hir/check_attr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 0 additions & 1 deletion src/librustc/infer/error_reporting/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 0 additions & 2 deletions src/librustc/infer/error_reporting/need_type_info.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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>,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 0 additions & 2 deletions src/librustc/infer/error_reporting/note.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 0 additions & 2 deletions src/librustc/infer/opaque_types/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 0 additions & 2 deletions src/librustc/middle/lang_items.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 0 additions & 2 deletions src/librustc/middle/weak_lang_items.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;)*) => (

Expand Down
2 changes: 0 additions & 2 deletions src/librustc/mir/interpret/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 0 additions & 2 deletions src/librustc/traits/error_reporting/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 0 additions & 2 deletions src/librustc/traits/error_reporting/suggestions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 0 additions & 2 deletions src/librustc/traits/on_unimplemented.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
2 changes: 0 additions & 2 deletions src/librustc/traits/query/dropck_outlives.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 0 additions & 2 deletions src/librustc/traits/specialize/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 0 additions & 2 deletions src/librustc/ty/query/plumbing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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>>,
Expand Down
1 change: 0 additions & 1 deletion src/librustc_ast_lowering/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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" }
Expand Down
1 change: 0 additions & 1 deletion src/librustc_ast_lowering/expr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 0 additions & 1 deletion src/librustc_ast_lowering/item.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand Down
1 change: 0 additions & 1 deletion src/librustc_ast_lowering/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand Down
1 change: 0 additions & 1 deletion src/librustc_ast_lowering/path.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand Down
1 change: 0 additions & 1 deletion src/librustc_ast_passes/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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" }
Expand Down
2 changes: 0 additions & 2 deletions src/librustc_ast_passes/ast_validation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
1 change: 0 additions & 1 deletion src/librustc_ast_passes/feature_gate.rs
Original file line number Diff line number Diff line change
@@ -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};
Expand Down
1 change: 0 additions & 1 deletion src/librustc_builtin_macros/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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" }
2 changes: 0 additions & 2 deletions src/librustc_builtin_macros/asm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 0 additions & 2 deletions src/librustc_builtin_macros/deriving/default.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
1 change: 0 additions & 1 deletion src/librustc_codegen_ssa/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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" }
2 changes: 0 additions & 2 deletions src/librustc_codegen_ssa/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 0 additions & 2 deletions src/librustc_codegen_ssa/mir/statement.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Loading