Skip to content

Commit 9dcf73a

Browse files
Rename rustc_hir_monomorphize/src/errors.rs into rustc_hir_monomorphize/src/diagnostics.rs
1 parent 09a3713 commit 9dcf73a

7 files changed

Lines changed: 13 additions & 13 deletions

File tree

compiler/rustc_monomorphize/src/collector.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ use rustc_session::config::{DebugInfo, EntryFnType};
235235
use rustc_span::{DUMMY_SP, Span, Spanned, dummy_spanned, respan};
236236
use tracing::{debug, instrument, trace};
237237

238-
use crate::errors::{
238+
use crate::diagnostics::{
239239
self, EncounteredErrorWhileInstantiating, EncounteredErrorWhileInstantiatingGlobalAsm,
240240
NoOptimizedMir, RecursionLimit,
241241
};
@@ -1702,7 +1702,7 @@ impl<'v> RootCollector<'_, 'v> {
17021702
}
17031703

17041704
let Some(start_def_id) = self.tcx.lang_items().start_fn() else {
1705-
self.tcx.dcx().emit_fatal(errors::StartNotFound);
1705+
self.tcx.dcx().emit_fatal(diagnostics::StartNotFound);
17061706
};
17071707
let main_ret_ty = self.tcx.fn_sig(main_def_id).no_bound_vars().unwrap().output();
17081708

File renamed without changes.

compiler/rustc_monomorphize/src/graph_checks/statics.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ use rustc_middle::mono::MonoItem;
88
use rustc_middle::ty::TyCtxt;
99

1010
use crate::collector::UsageMap;
11-
use crate::errors;
11+
use crate::diagnostics;
1212

1313
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
1414
struct StaticNodeIdx(usize);
@@ -105,7 +105,7 @@ pub(super) fn check_static_initializers_are_acyclic<'tcx, 'a, 'b>(
105105
let head_def = statics[nodes[0].index()];
106106
let head_span = tcx.def_span(head_def);
107107

108-
tcx.dcx().emit_err(errors::StaticInitializerCyclic {
108+
tcx.dcx().emit_err(diagnostics::StaticInitializerCyclic {
109109
span: head_span,
110110
labels: nodes.iter().map(|&n| tcx.def_span(statics[n.index()])).collect(),
111111
head: &tcx.def_path_str(head_def),

compiler/rustc_monomorphize/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ use rustc_middle::{bug, traits};
1313
use rustc_span::ErrorGuaranteed;
1414

1515
mod collector;
16-
mod errors;
16+
mod diagnostics;
1717
mod graph_checks;
1818
mod mono_checks;
1919
mod partitioning;

compiler/rustc_monomorphize/src/mono_checks/abi_check.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ use rustc_span::def_id::DefId;
88
use rustc_span::{DUMMY_SP, Span, Symbol, sym};
99
use rustc_target::callconv::{FnAbi, PassMode};
1010

11-
use crate::errors;
11+
use crate::diagnostics;
1212

1313
/// Are vector registers used?
1414
enum UsesVectorRegisters {
@@ -71,7 +71,7 @@ fn do_check_simd_vector_abi<'tcx>(
7171
Some((_, feature)) => feature,
7272
None => {
7373
let (span, _hir_id) = loc();
74-
tcx.dcx().emit_err(errors::AbiErrorUnsupportedVectorType {
74+
tcx.dcx().emit_err(diagnostics::AbiErrorUnsupportedVectorType {
7575
span,
7676
ty: arg_abi.layout.ty,
7777
is_call,
@@ -81,7 +81,7 @@ fn do_check_simd_vector_abi<'tcx>(
8181
};
8282
if !feature.is_empty() && !have_feature(Symbol::intern(feature)) {
8383
let (span, _hir_id) = loc();
84-
tcx.dcx().emit_err(errors::AbiErrorDisabledVectorType {
84+
tcx.dcx().emit_err(diagnostics::AbiErrorDisabledVectorType {
8585
span,
8686
required_feature: feature,
8787
ty: arg_abi.layout.ty,
@@ -98,7 +98,7 @@ fn do_check_simd_vector_abi<'tcx>(
9898
};
9999
if !required_feature.is_empty() && !have_feature(Symbol::intern(required_feature)) {
100100
let (span, _) = loc();
101-
tcx.dcx().emit_err(errors::AbiErrorDisabledVectorType {
101+
tcx.dcx().emit_err(diagnostics::AbiErrorDisabledVectorType {
102102
span,
103103
required_feature,
104104
ty: arg_abi.layout.ty,
@@ -115,7 +115,7 @@ fn do_check_simd_vector_abi<'tcx>(
115115
// The `vectorcall` ABI is special in that it requires SSE2 no matter which types are being passed.
116116
if abi.conv == CanonAbi::X86(X86Call::Vectorcall) && !have_feature(sym::sse2) {
117117
let (span, _hir_id) = loc();
118-
tcx.dcx().emit_err(errors::AbiRequiredTargetFeature {
118+
tcx.dcx().emit_err(diagnostics::AbiRequiredTargetFeature {
119119
span,
120120
required_feature: "sse2",
121121
abi: "vectorcall",
@@ -142,7 +142,7 @@ fn do_check_unsized_params<'tcx>(
142142
for arg_abi in fn_abi.args.iter() {
143143
if !arg_abi.layout.layout.is_sized() {
144144
let (span, _hir_id) = loc();
145-
tcx.dcx().emit_err(errors::AbiErrorUnsupportedUnsizedParameter {
145+
tcx.dcx().emit_err(diagnostics::AbiErrorUnsupportedUnsizedParameter {
146146
span,
147147
ty: arg_abi.layout.ty,
148148
is_call,

compiler/rustc_monomorphize/src/mono_checks/move_check.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ use rustc_session::lint::builtin::LARGE_ASSIGNMENTS;
99
use rustc_span::{Span, Spanned, sym};
1010
use tracing::{debug, trace};
1111

12-
use crate::errors::LargeAssignmentsLint;
12+
use crate::diagnostics::LargeAssignmentsLint;
1313

1414
struct MoveCheckVisitor<'tcx> {
1515
tcx: TyCtxt<'tcx>,

compiler/rustc_monomorphize/src/partitioning.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ use rustc_target::spec::SymbolVisibility;
124124
use tracing::debug;
125125

126126
use crate::collector::{self, MonoItemCollectionStrategy, UsageMap};
127-
use crate::errors::{CouldntDumpMonoStats, SymbolAlreadyDefined};
127+
use crate::diagnostics::{CouldntDumpMonoStats, SymbolAlreadyDefined};
128128
use crate::graph_checks::target_specific_checks;
129129

130130
struct PartitioningCx<'a, 'tcx> {

0 commit comments

Comments
 (0)