about summary refs log tree commit diff
path: root/compiler/rustc_ty_utils/src/errors.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-04-10 01:57:51 +0000
committerbors <bors@rust-lang.org>2023-04-10 01:57:51 +0000
commit3c2e2dd5c516acc60ababd12e5dba684d71c2315 (patch)
tree3c98cde9acdc4917072d59c1047155d6eaeea602 /compiler/rustc_ty_utils/src/errors.rs
parent696aaad58c57a589f6fb2ecff5bae2eec581cb71 (diff)
parentdd5942d77c44bd0f6baac5c2dc3e6f73df82015d (diff)
downloadrust-3c2e2dd5c516acc60ababd12e5dba684d71c2315.tar.gz
rust-3c2e2dd5c516acc60ababd12e5dba684d71c2315.zip
Auto merge of #110127 - matthiaskrgr:rollup-6ui12x5, r=matthiaskrgr
Rollup of 6 pull requests

Successful merges:

 - #108843 (Instantiate instead of erasing binder when probing param methods)
 - #109985 (Add little `is_test_crate` function)
 - #110028 (Migrate `rustc_hir_analysis` to session diagnostic [Part 3])
 - #110095 (Migrate remainder of rustc_ty_utils to `SessionDiagnostic`)
 - #110108 (Add renaming of ignore-git to changelog)
 - #110114 (compiletest: Give a better error message if `node` isn't installed)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_ty_utils/src/errors.rs')
-rw-r--r--compiler/rustc_ty_utils/src/errors.rs33
1 files changed, 33 insertions, 0 deletions
diff --git a/compiler/rustc_ty_utils/src/errors.rs b/compiler/rustc_ty_utils/src/errors.rs
index ab3e62f0484..3db3c98e9e2 100644
--- a/compiler/rustc_ty_utils/src/errors.rs
+++ b/compiler/rustc_ty_utils/src/errors.rs
@@ -67,3 +67,36 @@ pub enum GenericConstantTooComplexSub {
     #[label(ty_utils_operation_not_supported)]
     OperationNotSupported(#[primary_span] Span),
 }
+
+#[derive(Diagnostic)]
+#[diag(ty_utils_unexpected_fnptr_associated_item)]
+pub struct UnexpectedFnPtrAssociatedItem {
+    #[primary_span]
+    pub span: Span,
+}
+
+#[derive(Diagnostic)]
+#[diag(ty_utils_zero_length_simd_type)]
+pub struct ZeroLengthSimdType<'tcx> {
+    pub ty: Ty<'tcx>,
+}
+
+#[derive(Diagnostic)]
+#[diag(ty_utils_multiple_array_fields_simd_type)]
+pub struct MultipleArrayFieldsSimdType<'tcx> {
+    pub ty: Ty<'tcx>,
+}
+
+#[derive(Diagnostic)]
+#[diag(ty_utils_oversized_simd_type)]
+pub struct OversizedSimdType<'tcx> {
+    pub ty: Ty<'tcx>,
+    pub max_lanes: u64,
+}
+
+#[derive(Diagnostic)]
+#[diag(ty_utils_non_primative_simd_type)]
+pub struct NonPrimitiveSimdType<'tcx> {
+    pub ty: Ty<'tcx>,
+    pub e_ty: Ty<'tcx>,
+}