1
Fork 0

remove cmse validation from rustc_codegen_ssa

it was moved to hir_analysis in the previous commit
This commit is contained in:
Folkert 2024-07-18 12:08:23 +02:00
parent 7b63734961
commit 6b6b8422ba
No known key found for this signature in database
GPG key ID: 1F17F6FFD112B97C
7 changed files with 4 additions and 120 deletions

View file

@ -1287,10 +1287,9 @@ pub(super) fn check_transparent<'tcx>(tcx: TyCtxt<'tcx>, adt: ty::AdtDef<'tcx>)
(span, trivial, check_non_exhaustive(tcx, ty).break_value())
});
let non_trivial_fields =
field_infos.clone().filter_map(
|(span, trivial, _non_exhaustive)| if !trivial { Some(span) } else { None },
);
let non_trivial_fields = field_infos
.clone()
.filter_map(|(span, trivial, _non_exhaustive)| if !trivial { Some(span) } else { None });
let non_trivial_count = non_trivial_fields.clone().count();
if non_trivial_count >= 2 {
bad_non_zero_sized_fields(

View file

@ -1749,11 +1749,7 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ {
generic_segments.iter().map(|GenericPathSegment(_, index)| index).collect();
let _ = self.prohibit_generic_args(
path.segments.iter().enumerate().filter_map(|(index, seg)| {
if !indices.contains(&index) {
Some(seg)
} else {
None
}
if !indices.contains(&index) { Some(seg) } else { None }
}),
GenericsArgsErrExtend::DefVariant,
);