mirror of
https://github.com/allankoechke/rust.git
synced 2026-11-30 11:05:36 +00:00
Rollup merge of #157700 - GuillaumeGomez:rename-err-to-diag-2, r=JonathanBrouwer
Rename `errors.rs` file to `diagnostics.rs` (5/N) Follow-up of https://github.com/rust-lang/rust/pull/157485. r? @JonathanBrouwer
This commit is contained in:
@@ -18,7 +18,7 @@ use crate::builder::expr::category::{Category, RvalueFunc};
|
||||
use crate::builder::matches::{DeclareLetBindings, Exhaustive, HasMatchGuard};
|
||||
use crate::builder::scope::LintLevel;
|
||||
use crate::builder::{BlockAnd, BlockAndExtension, BlockFrame, Builder, NeedsTemporary};
|
||||
use crate::errors::{LoopMatchArmWithGuard, LoopMatchUnsupportedType};
|
||||
use crate::diagnostics::{LoopMatchArmWithGuard, LoopMatchUnsupportedType};
|
||||
|
||||
impl<'a, 'tcx> Builder<'a, 'tcx> {
|
||||
/// Compile `expr`, storing the result into `destination`, which
|
||||
|
||||
@@ -44,7 +44,7 @@ use rustc_span::{Span, Symbol};
|
||||
|
||||
use crate::builder::expr::as_place::PlaceBuilder;
|
||||
use crate::builder::scope::{DropKind, LintLevel};
|
||||
use crate::errors;
|
||||
use crate::diagnostics;
|
||||
|
||||
pub(crate) fn closure_saved_names_of_captured_variables<'tcx>(
|
||||
tcx: TyCtxt<'tcx>,
|
||||
@@ -931,7 +931,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
|
||||
lint::builtin::UNREACHABLE_CODE,
|
||||
lint_root,
|
||||
target_loc.span,
|
||||
errors::UnreachableDueToUninhabited {
|
||||
diagnostics::UnreachableDueToUninhabited {
|
||||
expr: target_loc.span,
|
||||
orig: orig_span,
|
||||
descr,
|
||||
|
||||
@@ -99,7 +99,7 @@ use tracing::{debug, instrument};
|
||||
|
||||
use super::matches::BuiltMatchTree;
|
||||
use crate::builder::{BlockAnd, BlockAndExtension, BlockFrame, Builder, CFG};
|
||||
use crate::errors::{
|
||||
use crate::diagnostics::{
|
||||
ConstContinueBadConst, ConstContinueNotMonomorphicConst, ConstContinueUnknownJumpTarget,
|
||||
};
|
||||
|
||||
@@ -924,7 +924,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
|
||||
| ExprKind::NamedConst { .. } => self.as_constant(&self.thir[value]),
|
||||
|
||||
other => {
|
||||
use crate::errors::ConstContinueNotMonomorphicConstReason as Reason;
|
||||
use crate::diagnostics::ConstContinueNotMonomorphicConstReason as Reason;
|
||||
|
||||
let span = expr.span;
|
||||
let reason = match other {
|
||||
|
||||
@@ -16,7 +16,7 @@ use rustc_session::lint::builtin::{DEPRECATED_SAFE_2024, UNSAFE_OP_IN_UNSAFE_FN,
|
||||
use rustc_span::def_id::{DefId, LocalDefId};
|
||||
use rustc_span::{Span, Symbol};
|
||||
|
||||
use crate::errors::*;
|
||||
use crate::diagnostics::*;
|
||||
|
||||
struct UnsafetyVisitor<'a, 'tcx> {
|
||||
tcx: TyCtxt<'tcx>,
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
mod builder;
|
||||
mod check_tail_calls;
|
||||
mod check_unsafety;
|
||||
mod errors;
|
||||
mod diagnostics;
|
||||
pub mod thir;
|
||||
|
||||
use rustc_middle::util::Providers;
|
||||
|
||||
@@ -22,7 +22,7 @@ use rustc_middle::{bug, span_bug};
|
||||
use rustc_span::Span;
|
||||
use tracing::{debug, info, instrument, trace};
|
||||
|
||||
use crate::errors::*;
|
||||
use crate::diagnostics::*;
|
||||
use crate::thir::cx::ThirBuildCx;
|
||||
|
||||
impl<'tcx> ThirBuildCx<'tcx> {
|
||||
|
||||
@@ -27,7 +27,7 @@ use rustc_span::{Ident, Span};
|
||||
use rustc_trait_selection::infer::InferCtxtExt;
|
||||
use tracing::instrument;
|
||||
|
||||
use crate::errors::*;
|
||||
use crate::diagnostics::*;
|
||||
|
||||
pub(crate) fn check_match(tcx: TyCtxt<'_>, def_id: LocalDefId) -> Result<(), ErrorGuaranteed> {
|
||||
let typeck_results = tcx.typeck(def_id);
|
||||
|
||||
@@ -20,7 +20,7 @@ use rustc_trait_selection::traits::query::evaluate_obligation::InferCtxtExt;
|
||||
use tracing::{debug, instrument, trace};
|
||||
|
||||
use super::PatCtxt;
|
||||
use crate::errors::{
|
||||
use crate::diagnostics::{
|
||||
ConstPatternDependsOnGenericParameter, CouldNotEvalConstPattern, InvalidPattern, NaNPattern,
|
||||
PointerPattern, SuggestEq, TypeNotPartialEq, TypeNotStructural, UnionPattern, UnsizedPattern,
|
||||
};
|
||||
|
||||
@@ -29,7 +29,7 @@ use tracing::{debug, instrument};
|
||||
|
||||
pub(crate) use self::check_match::check_match;
|
||||
use self::migration::PatMigration;
|
||||
use crate::errors::*;
|
||||
use crate::diagnostics::*;
|
||||
use crate::thir::cx::ThirBuildCx;
|
||||
|
||||
/// Context for lowering HIR patterns to THIR patterns.
|
||||
|
||||
@@ -23,8 +23,8 @@ pub use self::framework::{
|
||||
use self::move_paths::MoveData;
|
||||
|
||||
pub mod debuginfo;
|
||||
mod diagnostics;
|
||||
mod drop_flag_effects;
|
||||
mod errors;
|
||||
mod framework;
|
||||
pub mod impls;
|
||||
pub mod move_paths;
|
||||
|
||||
@@ -5,7 +5,7 @@ use rustc_middle::ty::{self, Ty, TyCtxt};
|
||||
use rustc_span::{Span, sym};
|
||||
use tracing::{debug, info};
|
||||
|
||||
use crate::errors::{
|
||||
use crate::diagnostics::{
|
||||
PeekArgumentNotALocal, PeekArgumentUntracked, PeekBitNotSet, PeekMustBeNotTemporary,
|
||||
PeekMustBePlaceOrRefPlace, StopAfterDataFlowEndedCompilation,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user