diff options
| author | bors <bors@rust-lang.org> | 2024-02-11 17:43:51 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-02-11 17:43:51 +0000 |
| commit | a166af7729d6f4e6570918701f79dfae750a00c4 (patch) | |
| tree | 3d1a116ad7d2c6af70cd581af360a81d3f29494d /compiler/rustc_const_eval/src/errors.rs | |
| parent | 980cf089f48b3cab018808f509dbb716ecf8e314 (diff) | |
| parent | 870435b50bf1b80285be8e80cedb4cdeb5419874 (diff) | |
| download | rust-a166af7729d6f4e6570918701f79dfae750a00c4.tar.gz rust-a166af7729d6f4e6570918701f79dfae750a00c4.zip | |
Auto merge of #120903 - matthiaskrgr:rollup-tmsuzth, r=matthiaskrgr
Rollup of 9 pull requests Successful merges: - #119213 (simd intrinsics: add simd_shuffle_generic and other missing intrinsics) - #120272 (Suppress suggestions in derive macro) - #120773 (large_assignments: Allow moves into functions) - #120874 (Take empty `where` bounds into account when suggesting predicates) - #120882 (interpret/write_discriminant: when encoding niched variant, ensure the stored value matches) - #120883 (interpret: rename ReadExternStatic → ExternStatic) - #120890 (Adapt `llvm-has-rust-patches` validation to take `llvm-config` into account.) - #120895 (don't skip coercions for types with errors) - #120896 (Print kind of coroutine closure) r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_const_eval/src/errors.rs')
| -rw-r--r-- | compiler/rustc_const_eval/src/errors.rs | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/compiler/rustc_const_eval/src/errors.rs b/compiler/rustc_const_eval/src/errors.rs index fb89b49fade..a649526c196 100644 --- a/compiler/rustc_const_eval/src/errors.rs +++ b/compiler/rustc_const_eval/src/errors.rs @@ -497,6 +497,9 @@ impl<'a> ReportErrorExt for UndefinedBehaviorInfo<'a> { ScalarSizeMismatch(_) => const_eval_scalar_size_mismatch, UninhabitedEnumVariantWritten(_) => const_eval_uninhabited_enum_variant_written, UninhabitedEnumVariantRead(_) => const_eval_uninhabited_enum_variant_read, + InvalidNichedEnumVariantWritten { .. } => { + const_eval_invalid_niched_enum_variant_written + } AbiMismatchArgument { .. } => const_eval_incompatible_types, AbiMismatchReturn { .. } => const_eval_incompatible_return_types, } @@ -585,6 +588,9 @@ impl<'a> ReportErrorExt for UndefinedBehaviorInfo<'a> { builder.arg("target_size", info.target_size); builder.arg("data_size", info.data_size); } + InvalidNichedEnumVariantWritten { enum_ty } => { + builder.arg("ty", enum_ty.to_string()); + } AbiMismatchArgument { caller_ty, callee_ty } | AbiMismatchReturn { caller_ty, callee_ty } => { builder.arg("caller_ty", caller_ty.to_string()); @@ -793,7 +799,7 @@ impl ReportErrorExt for UnsupportedOpInfo { UnsupportedOpInfo::ReadPartialPointer(_) => const_eval_partial_pointer_copy, UnsupportedOpInfo::ReadPointerAsInt(_) => const_eval_read_pointer_as_int, UnsupportedOpInfo::ThreadLocalStatic(_) => const_eval_thread_local_static, - UnsupportedOpInfo::ReadExternStatic(_) => const_eval_read_extern_static, + UnsupportedOpInfo::ExternStatic(_) => const_eval_extern_static, } } fn add_args<G: EmissionGuarantee>(self, _: &DiagCtxt, builder: &mut DiagnosticBuilder<'_, G>) { @@ -812,7 +818,7 @@ impl ReportErrorExt for UnsupportedOpInfo { OverwritePartialPointer(ptr) | ReadPartialPointer(ptr) => { builder.arg("ptr", ptr); } - ThreadLocalStatic(did) | ReadExternStatic(did) => { + ThreadLocalStatic(did) | ExternStatic(did) => { builder.arg("did", format!("{did:?}")); } } |
