Skip to content

Commit b43c6e9

Browse files
authored
Rollup merge of #157700 - GuillaumeGomez:rename-err-to-diag-2, r=JonathanBrouwer
Rename `errors.rs` file to `diagnostics.rs` (5/N) Follow-up of #157485. r? @JonathanBrouwer
2 parents c3c980d + b679cbd commit b43c6e9

13 files changed

Lines changed: 13 additions & 13 deletions

File tree

compiler/rustc_mir_build/src/builder/expr/into.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ use crate::builder::expr::category::{Category, RvalueFunc};
1818
use crate::builder::matches::{DeclareLetBindings, Exhaustive, HasMatchGuard};
1919
use crate::builder::scope::LintLevel;
2020
use crate::builder::{BlockAnd, BlockAndExtension, BlockFrame, Builder, NeedsTemporary};
21-
use crate::errors::{LoopMatchArmWithGuard, LoopMatchUnsupportedType};
21+
use crate::diagnostics::{LoopMatchArmWithGuard, LoopMatchUnsupportedType};
2222

2323
impl<'a, 'tcx> Builder<'a, 'tcx> {
2424
/// Compile `expr`, storing the result into `destination`, which

compiler/rustc_mir_build/src/builder/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ use rustc_span::{Span, Symbol};
4444

4545
use crate::builder::expr::as_place::PlaceBuilder;
4646
use crate::builder::scope::{DropKind, LintLevel};
47-
use crate::errors;
47+
use crate::diagnostics;
4848

4949
pub(crate) fn closure_saved_names_of_captured_variables<'tcx>(
5050
tcx: TyCtxt<'tcx>,
@@ -931,7 +931,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
931931
lint::builtin::UNREACHABLE_CODE,
932932
lint_root,
933933
target_loc.span,
934-
errors::UnreachableDueToUninhabited {
934+
diagnostics::UnreachableDueToUninhabited {
935935
expr: target_loc.span,
936936
orig: orig_span,
937937
descr,

compiler/rustc_mir_build/src/builder/scope.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ use tracing::{debug, instrument};
9999

100100
use super::matches::BuiltMatchTree;
101101
use crate::builder::{BlockAnd, BlockAndExtension, BlockFrame, Builder, CFG};
102-
use crate::errors::{
102+
use crate::diagnostics::{
103103
ConstContinueBadConst, ConstContinueNotMonomorphicConst, ConstContinueUnknownJumpTarget,
104104
};
105105

@@ -924,7 +924,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
924924
| ExprKind::NamedConst { .. } => self.as_constant(&self.thir[value]),
925925

926926
other => {
927-
use crate::errors::ConstContinueNotMonomorphicConstReason as Reason;
927+
use crate::diagnostics::ConstContinueNotMonomorphicConstReason as Reason;
928928

929929
let span = expr.span;
930930
let reason = match other {

compiler/rustc_mir_build/src/check_unsafety.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ use rustc_session::lint::builtin::{DEPRECATED_SAFE_2024, UNSAFE_OP_IN_UNSAFE_FN,
1616
use rustc_span::def_id::{DefId, LocalDefId};
1717
use rustc_span::{Span, Symbol};
1818

19-
use crate::errors::*;
19+
use crate::diagnostics::*;
2020

2121
struct UnsafetyVisitor<'a, 'tcx> {
2222
tcx: TyCtxt<'tcx>,
File renamed without changes.

compiler/rustc_mir_build/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
mod builder;
1212
mod check_tail_calls;
1313
mod check_unsafety;
14-
mod errors;
14+
mod diagnostics;
1515
pub mod thir;
1616

1717
use rustc_middle::util::Providers;

compiler/rustc_mir_build/src/thir/cx/expr.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ use rustc_middle::{bug, span_bug};
2222
use rustc_span::Span;
2323
use tracing::{debug, info, instrument, trace};
2424

25-
use crate::errors::*;
25+
use crate::diagnostics::*;
2626
use crate::thir::cx::ThirBuildCx;
2727

2828
impl<'tcx> ThirBuildCx<'tcx> {

compiler/rustc_mir_build/src/thir/pattern/check_match.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ use rustc_span::{Ident, Span};
2727
use rustc_trait_selection::infer::InferCtxtExt;
2828
use tracing::instrument;
2929

30-
use crate::errors::*;
30+
use crate::diagnostics::*;
3131

3232
pub(crate) fn check_match(tcx: TyCtxt<'_>, def_id: LocalDefId) -> Result<(), ErrorGuaranteed> {
3333
let typeck_results = tcx.typeck(def_id);

compiler/rustc_mir_build/src/thir/pattern/const_to_pat.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ use rustc_trait_selection::traits::query::evaluate_obligation::InferCtxtExt;
2020
use tracing::{debug, instrument, trace};
2121

2222
use super::PatCtxt;
23-
use crate::errors::{
23+
use crate::diagnostics::{
2424
ConstPatternDependsOnGenericParameter, CouldNotEvalConstPattern, InvalidPattern, NaNPattern,
2525
PointerPattern, SuggestEq, TypeNotPartialEq, TypeNotStructural, UnionPattern, UnsizedPattern,
2626
};

compiler/rustc_mir_build/src/thir/pattern/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ use tracing::{debug, instrument};
2929

3030
pub(crate) use self::check_match::check_match;
3131
use self::migration::PatMigration;
32-
use crate::errors::*;
32+
use crate::diagnostics::*;
3333
use crate::thir::cx::ThirBuildCx;
3434

3535
/// Context for lowering HIR patterns to THIR patterns.

0 commit comments

Comments
 (0)