diff options
| author | Michael Goulet <michael@errs.io> | 2024-03-21 17:33:10 -0400 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2024-03-22 11:13:29 -0400 |
| commit | 7be0dbe77292de955da02fe1de1626bdd2e4cc0a (patch) | |
| tree | be790699979e783668fcaca21d48c6982983b13e /compiler/rustc_hir_analysis/src/check/check.rs | |
| parent | ff0c31e6b9bc8e847c3b1b9d61793325edfacf47 (diff) | |
| download | rust-7be0dbe77292de955da02fe1de1626bdd2e4cc0a.tar.gz rust-7be0dbe77292de955da02fe1de1626bdd2e4cc0a.zip | |
Make RawPtr take Ty and Mutbl separately
Diffstat (limited to 'compiler/rustc_hir_analysis/src/check/check.rs')
| -rw-r--r-- | compiler/rustc_hir_analysis/src/check/check.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/compiler/rustc_hir_analysis/src/check/check.rs b/compiler/rustc_hir_analysis/src/check/check.rs index 9ea73913eb6..1286a724e95 100644 --- a/compiler/rustc_hir_analysis/src/check/check.rs +++ b/compiler/rustc_hir_analysis/src/check/check.rs @@ -937,7 +937,10 @@ pub fn check_simd(tcx: TyCtxt<'_>, sp: Span, def_id: LocalDefId) { ty::Int(_) | ty::Uint(_) | ty::Float(_) | ty::RawPtr(_, _) => (), // struct(u8, u8, u8, u8) is ok ty::Array(t, _) if matches!(t.kind(), ty::Param(_)) => (), // pass struct<T>([T; N]) through, let monomorphization catch errors ty::Array(t, _clen) - if matches!(t.kind(), ty::Int(_) | ty::Uint(_) | ty::Float(_) | ty::RawPtr(_, _)) => + if matches!( + t.kind(), + ty::Int(_) | ty::Uint(_) | ty::Float(_) | ty::RawPtr(_, _) + ) => { /* struct([f32; 4]) is ok */ } _ => { struct_span_code_err!( |
