diff options
| author | Laurențiu Nicola <lnicola@dend.ro> | 2024-11-01 14:12:18 +0200 |
|---|---|---|
| committer | Laurențiu Nicola <lnicola@dend.ro> | 2024-11-01 14:12:18 +0200 |
| commit | 9acf57c48e0d55e7b2d07dae2bb4fbfc3fc010dd (patch) | |
| tree | 0cff0055f2ed9e9d18df92e2d98f10d7b5359075 | |
| parent | 7303227589bafb12e12b459741e4c45546e17808 (diff) | |
| download | rust-9acf57c48e0d55e7b2d07dae2bb4fbfc3fc010dd.tar.gz rust-9acf57c48e0d55e7b2d07dae2bb4fbfc3fc010dd.zip | |
Format code
| -rw-r--r-- | src/tools/rust-analyzer/crates/hir-ty/src/layout.rs | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/tools/rust-analyzer/crates/hir-ty/src/layout.rs b/src/tools/rust-analyzer/crates/hir-ty/src/layout.rs index c5fa20bc8ac..0c1f63880cd 100644 --- a/src/tools/rust-analyzer/crates/hir-ty/src/layout.rs +++ b/src/tools/rust-analyzer/crates/hir-ty/src/layout.rs @@ -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,11 +295,12 @@ 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) { - BackendRepr::Uninhabited - } else { - BackendRepr::Memory { sized: true } - }; + let backend_repr = + if count != 0 && matches!(element.backend_repr, BackendRepr::Uninhabited) { + BackendRepr::Uninhabited + } else { + BackendRepr::Memory { sized: true } + }; let largest_niche = if count != 0 { element.largest_niche } else { None }; |
