mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 11:31:15 +00:00
Format code
This commit is contained in:
parent
724f161cc9
commit
b385bf2e53
@ -6,8 +6,9 @@ use base_db::ra_salsa::Cycle;
|
|||||||
use chalk_ir::{AdtId, FloatTy, IntTy, TyKind, UintTy};
|
use chalk_ir::{AdtId, FloatTy, IntTy, TyKind, UintTy};
|
||||||
use hir_def::{
|
use hir_def::{
|
||||||
layout::{
|
layout::{
|
||||||
BackendRepr, FieldsShape, Float, Integer, LayoutCalculator, LayoutCalculatorError, LayoutData,
|
BackendRepr, FieldsShape, Float, Integer, LayoutCalculator, LayoutCalculatorError,
|
||||||
Primitive, ReprOptions, Scalar, Size, StructKind, TargetDataLayout, WrappingRange,
|
LayoutData, Primitive, ReprOptions, Scalar, Size, StructKind, TargetDataLayout,
|
||||||
|
WrappingRange,
|
||||||
},
|
},
|
||||||
LocalFieldId, StructId,
|
LocalFieldId, StructId,
|
||||||
};
|
};
|
||||||
@ -294,11 +295,12 @@ pub fn layout_of_ty_query(
|
|||||||
.checked_mul(count, dl)
|
.checked_mul(count, dl)
|
||||||
.ok_or(LayoutError::BadCalc(LayoutCalculatorError::SizeOverflow))?;
|
.ok_or(LayoutError::BadCalc(LayoutCalculatorError::SizeOverflow))?;
|
||||||
|
|
||||||
let backend_repr = if count != 0 && matches!(element.backend_repr, BackendRepr::Uninhabited) {
|
let backend_repr =
|
||||||
BackendRepr::Uninhabited
|
if count != 0 && matches!(element.backend_repr, BackendRepr::Uninhabited) {
|
||||||
} else {
|
BackendRepr::Uninhabited
|
||||||
BackendRepr::Memory { sized: true }
|
} else {
|
||||||
};
|
BackendRepr::Memory { sized: true }
|
||||||
|
};
|
||||||
|
|
||||||
let largest_niche = if count != 0 { element.largest_niche } else { None };
|
let largest_niche = if count != 0 { element.largest_niche } else { None };
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user