diff options
| author | Matthias Krüger <476013+matthiaskrgr@users.noreply.github.com> | 2025-03-02 22:44:25 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-03-02 22:44:25 +0100 |
| commit | bb089d7a92982b3c0cecbfaea8b78b2ed00e98c4 (patch) | |
| tree | f3ae474f17e6b8d9ceb0c1d92686a2d48277fe75 /compiler/rustc_codegen_ssa | |
| parent | bb091f26c8ef827de091ce33510b814db34f45b6 (diff) | |
| parent | 3a6f269f26454835aabac9055ef0cda820b048ec (diff) | |
| download | rust-bb089d7a92982b3c0cecbfaea8b78b2ed00e98c4.tar.gz rust-bb089d7a92982b3c0cecbfaea8b78b2ed00e98c4.zip | |
Rollup merge of #137851 - folkertdev:simd-intrinsic-mask-signed, r=workingjubilee
improve `simd_select` error message when used with invalid mask type followup to https://github.com/rust-lang/rust/pull/137828 This PR improves the error message for an invalid `simd_select` mask type, and adds testing for `simd_scatter` and `simd_gather` being used with invalid mask types. the `simd_masked_load` and `simd_masked_store` intrinsics already generated a better error message: https://github.com/rust-lang/rust/blob/0c72c0d11adeba449886089c6bd5d48363f7a2cd/tests/ui/simd/masked-load-store-build-fail.rs#L24-L37 r? `@workingjubilee`
Diffstat (limited to 'compiler/rustc_codegen_ssa')
| -rw-r--r-- | compiler/rustc_codegen_ssa/messages.ftl | 3 | ||||
| -rw-r--r-- | compiler/rustc_codegen_ssa/src/errors.rs | 1 |
2 files changed, 3 insertions, 1 deletions
diff --git a/compiler/rustc_codegen_ssa/messages.ftl b/compiler/rustc_codegen_ssa/messages.ftl index 22e262546c3..f15d6fba506 100644 --- a/compiler/rustc_codegen_ssa/messages.ftl +++ b/compiler/rustc_codegen_ssa/messages.ftl @@ -119,7 +119,8 @@ codegen_ssa_invalid_monomorphization_inserted_type = invalid monomorphization of codegen_ssa_invalid_monomorphization_invalid_bitmask = invalid monomorphization of `{$name}` intrinsic: invalid bitmask `{$mask_ty}`, expected `u{$expected_int_bits}` or `[u8; {$expected_bytes}]` -codegen_ssa_invalid_monomorphization_mask_type = invalid monomorphization of `{$name}` intrinsic: mask element type is `{$ty}`, expected `i_` +codegen_ssa_invalid_monomorphization_mask_type = invalid monomorphization of `{$name}` intrinsic: found mask element type is `{$ty}`, expected a signed integer type + .note = the mask may be widened, which only has the correct behavior for signed integers codegen_ssa_invalid_monomorphization_mismatched_lengths = invalid monomorphization of `{$name}` intrinsic: mismatched lengths: mask length `{$m_len}` != other vector length `{$v_len}` diff --git a/compiler/rustc_codegen_ssa/src/errors.rs b/compiler/rustc_codegen_ssa/src/errors.rs index 7e28961599f..ccf6d12977f 100644 --- a/compiler/rustc_codegen_ssa/src/errors.rs +++ b/compiler/rustc_codegen_ssa/src/errors.rs @@ -957,6 +957,7 @@ pub enum InvalidMonomorphization<'tcx> { }, #[diag(codegen_ssa_invalid_monomorphization_mask_type, code = E0511)] + #[note] MaskType { #[primary_span] span: Span, |
