Skip to content

Commit 7ae0618

Browse files
authored
Rollup merge of #68050 - Centril:canon-error, r=Mark-Simulacrum
Canonicalize rustc_error imports r? @Mark-Simulacrum
2 parents 93f0ba9 + 8bd3d24 commit 7ae0618

File tree

138 files changed

+242
-276
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

138 files changed

+242
-276
lines changed

Cargo.lock

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3654,6 +3654,7 @@ dependencies = [
36543654
"log",
36553655
"rustc",
36563656
"rustc_data_structures",
3657+
"rustc_errors",
36573658
"rustc_feature",
36583659
"rustc_hir",
36593660
"rustc_index",

src/librustc/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ rustc_hir = { path = "../librustc_hir" }
2626
rustc_target = { path = "../librustc_target" }
2727
rustc_macros = { path = "../librustc_macros" }
2828
rustc_data_structures = { path = "../librustc_data_structures" }
29+
rustc_errors = { path = "../librustc_errors" }
2930
rustc_index = { path = "../librustc_index" }
30-
errors = { path = "../librustc_errors", package = "rustc_errors" }
3131
rustc_serialize = { path = "../libserialize", package = "serialize" }
3232
syntax = { path = "../libsyntax" }
3333
rustc_span = { path = "../librustc_span" }

src/librustc/dep_graph/graph.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
use crate::ty::{self, TyCtxt};
2-
use errors::Diagnostic;
32
use parking_lot::{Condvar, Mutex};
43
use rustc_data_structures::fx::{FxHashMap, FxHashSet};
54
use rustc_data_structures::profiling::QueryInvocationId;
65
use rustc_data_structures::sharded::{self, Sharded};
76
use rustc_data_structures::stable_hasher::{HashStable, StableHasher};
87
use rustc_data_structures::sync::{AtomicU32, AtomicU64, Lock, Lrc, Ordering};
8+
use rustc_errors::Diagnostic;
99
use rustc_index::vec::{Idx, IndexVec};
1010
use smallvec::SmallVec;
1111
use std::collections::hash_map::Entry;

src/librustc/hir/check_attr.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ use crate::lint::builtin::UNUSED_ATTRIBUTES;
99
use crate::ty::query::Providers;
1010
use crate::ty::TyCtxt;
1111

12-
use errors::struct_span_err;
1312
use rustc_error_codes::*;
13+
use rustc_errors::struct_span_err;
1414
use rustc_hir as hir;
1515
use rustc_hir::def_id::DefId;
1616
use rustc_hir::intravisit::{self, NestedVisitorMap, Visitor};

src/librustc/infer/error_reporting/mod.rs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -64,15 +64,13 @@ use crate::ty::{
6464
subst::{Subst, SubstsRef},
6565
Region, Ty, TyCtxt, TypeFoldable,
6666
};
67+
use rustc_data_structures::fx::{FxHashMap, FxHashSet};
68+
use rustc_error_codes::*;
69+
use rustc_errors::{pluralize, struct_span_err};
70+
use rustc_errors::{Applicability, DiagnosticBuilder, DiagnosticStyledString};
6771
use rustc_hir as hir;
6872
use rustc_hir::def_id::DefId;
6973
use rustc_hir::Node;
70-
71-
use errors::{
72-
pluralize, struct_span_err, Applicability, DiagnosticBuilder, DiagnosticStyledString,
73-
};
74-
use rustc_data_structures::fx::{FxHashMap, FxHashSet};
75-
use rustc_error_codes::*;
7674
use rustc_span::{DesugaringKind, Pos, Span};
7775
use rustc_target::spec::abi;
7876
use std::{cmp, fmt};

src/librustc/infer/error_reporting/need_type_info.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ use crate::infer::type_variable::TypeVariableOriginKind;
33
use crate::infer::InferCtxt;
44
use crate::ty::print::Print;
55
use crate::ty::{self, DefIdTree, Infer, Ty, TyVar};
6-
use errors::{struct_span_err, Applicability, DiagnosticBuilder};
6+
use rustc_errors::{struct_span_err, Applicability, DiagnosticBuilder};
77
use rustc_hir as hir;
88
use rustc_hir::def::{DefKind, Namespace};
99
use rustc_hir::intravisit::{self, NestedVisitorMap, Visitor};
@@ -151,12 +151,12 @@ pub enum TypeAnnotationNeeded {
151151
E0284,
152152
}
153153

154-
impl Into<errors::DiagnosticId> for TypeAnnotationNeeded {
155-
fn into(self) -> errors::DiagnosticId {
154+
impl Into<rustc_errors::DiagnosticId> for TypeAnnotationNeeded {
155+
fn into(self) -> rustc_errors::DiagnosticId {
156156
match self {
157-
Self::E0282 => errors::error_code!(E0282),
158-
Self::E0283 => errors::error_code!(E0283),
159-
Self::E0284 => errors::error_code!(E0284),
157+
Self::E0282 => rustc_errors::error_code!(E0282),
158+
Self::E0283 => rustc_errors::error_code!(E0283),
159+
Self::E0284 => rustc_errors::error_code!(E0284),
160160
}
161161
}
162162
}

src/librustc/infer/error_reporting/nice_region_error/different_lifetimes.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ use crate::infer::error_reporting::nice_region_error::util::AnonymousParamInfo;
55
use crate::infer::error_reporting::nice_region_error::NiceRegionError;
66
use crate::util::common::ErrorReported;
77

8-
use errors::struct_span_err;
98
use rustc_error_codes::*;
9+
use rustc_errors::struct_span_err;
1010

1111
impl<'a, 'tcx> NiceRegionError<'a, 'tcx> {
1212
/// Print the error message for lifetime errors when both the concerned regions are anonymous.

src/librustc/infer/error_reporting/nice_region_error/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ use crate::infer::lexical_region_resolve::RegionResolutionError::*;
33
use crate::infer::InferCtxt;
44
use crate::ty::{self, TyCtxt};
55
use crate::util::common::ErrorReported;
6-
use errors::DiagnosticBuilder;
6+
use rustc_errors::DiagnosticBuilder;
77
use rustc_span::source_map::Span;
88

99
mod different_lifetimes;

src/librustc/infer/error_reporting/nice_region_error/named_anon_conflict.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
//! where one region is named and the other is anonymous.
33
use crate::infer::error_reporting::nice_region_error::NiceRegionError;
44
use crate::ty;
5-
use errors::{struct_span_err, Applicability, DiagnosticBuilder};
5+
use rustc_errors::{struct_span_err, Applicability, DiagnosticBuilder};
66
use rustc_hir::{FunctionRetTy, TyKind};
77

88
use rustc_error_codes::*;

src/librustc/infer/error_reporting/nice_region_error/placeholder_error.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ use crate::ty::error::ExpectedFound;
77
use crate::ty::print::{FmtPrinter, Print, RegionHighlightMode};
88
use crate::ty::subst::SubstsRef;
99
use crate::ty::{self, TyCtxt};
10-
use errors::DiagnosticBuilder;
10+
use rustc_errors::DiagnosticBuilder;
1111
use rustc_hir::def::Namespace;
1212
use rustc_hir::def_id::DefId;
1313

0 commit comments

Comments
 (0)