1
Fork 0

Format code

This commit is contained in:
Laurențiu Nicola 2025-03-10 11:37:21 +02:00
parent c372c55f2b
commit 1d983bf794

View file

@ -6,9 +6,8 @@ use base_db::ra_salsa::Cycle;
use chalk_ir::{AdtId, FloatTy, IntTy, TyKind, UintTy};
use hir_def::{
layout::{
Float, Integer, LayoutCalculator, LayoutCalculatorError,
LayoutData, Primitive, ReprOptions, Scalar, StructKind, TargetDataLayout,
WrappingRange,
Float, Integer, LayoutCalculator, LayoutCalculatorError, LayoutData, Primitive,
ReprOptions, Scalar, StructKind, TargetDataLayout, WrappingRange,
},
LocalFieldId, StructId,
};
@ -192,7 +191,9 @@ pub fn layout_of_ty_query(
valid_range: WrappingRange { start: 0, end: 0x10FFFF },
},
),
chalk_ir::Scalar::Int(i) => Layout::scalar(dl, scalar_unit(
chalk_ir::Scalar::Int(i) => Layout::scalar(
dl,
scalar_unit(
dl,
Primitive::Int(
match i {
@ -205,8 +206,11 @@ pub fn layout_of_ty_query(
},
true,
),
)),
chalk_ir::Scalar::Uint(i) => Layout::scalar(dl, scalar_unit(
),
),
chalk_ir::Scalar::Uint(i) => Layout::scalar(
dl,
scalar_unit(
dl,
Primitive::Int(
match i {
@ -219,8 +223,11 @@ pub fn layout_of_ty_query(
},
false,
),
)),
chalk_ir::Scalar::Float(f) => Layout::scalar(dl, scalar_unit(
),
),
chalk_ir::Scalar::Float(f) => Layout::scalar(
dl,
scalar_unit(
dl,
Primitive::Float(match f {
FloatTy::F16 => Float::F16,
@ -228,7 +235,8 @@ pub fn layout_of_ty_query(
FloatTy::F64 => Float::F64,
FloatTy::F128 => Float::F128,
}),
)),
),
),
},
TyKind::Tuple(len, tys) => {
let kind = if *len == 0 { StructKind::AlwaysSized } else { StructKind::MaybeUnsized };