Format code

This commit is contained in:
Laurențiu Nicola 2024-11-01 14:12:18 +02:00
parent 724f161cc9
commit b385bf2e53

View file

@ -6,8 +6,9 @@ use base_db::ra_salsa::Cycle;
use chalk_ir::{AdtId, FloatTy, IntTy, TyKind, UintTy};
use hir_def::{
layout::{
BackendRepr, FieldsShape, Float, Integer, LayoutCalculator, LayoutCalculatorError, LayoutData,
Primitive, ReprOptions, Scalar, Size, StructKind, TargetDataLayout, WrappingRange,
BackendRepr, FieldsShape, Float, Integer, LayoutCalculator, LayoutCalculatorError,
LayoutData, Primitive, ReprOptions, Scalar, Size, StructKind, TargetDataLayout,
WrappingRange,
},
LocalFieldId, StructId,
};
@ -294,7 +295,8 @@ pub fn layout_of_ty_query(
.checked_mul(count, dl)
.ok_or(LayoutError::BadCalc(LayoutCalculatorError::SizeOverflow))?;
let backend_repr = if count != 0 && matches!(element.backend_repr, BackendRepr::Uninhabited) {
let backend_repr =
if count != 0 && matches!(element.backend_repr, BackendRepr::Uninhabited) {
BackendRepr::Uninhabited
} else {
BackendRepr::Memory { sized: true }