mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-28 18:43:01 +00:00
Format code
This commit is contained in:
parent
1afcab1725
commit
25e4bd1f90
1 changed files with 43 additions and 35 deletions
|
|
@ -6,9 +6,8 @@ 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::{
|
||||||
Float, Integer, LayoutCalculator, LayoutCalculatorError,
|
Float, Integer, LayoutCalculator, LayoutCalculatorError, LayoutData, Primitive,
|
||||||
LayoutData, Primitive, ReprOptions, Scalar, StructKind, TargetDataLayout,
|
ReprOptions, Scalar, StructKind, TargetDataLayout, WrappingRange,
|
||||||
WrappingRange,
|
|
||||||
},
|
},
|
||||||
LocalFieldId, StructId,
|
LocalFieldId, StructId,
|
||||||
};
|
};
|
||||||
|
|
@ -192,7 +191,9 @@ pub fn layout_of_ty_query(
|
||||||
valid_range: WrappingRange { start: 0, end: 0x10FFFF },
|
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,
|
dl,
|
||||||
Primitive::Int(
|
Primitive::Int(
|
||||||
match i {
|
match i {
|
||||||
|
|
@ -205,8 +206,11 @@ pub fn layout_of_ty_query(
|
||||||
},
|
},
|
||||||
true,
|
true,
|
||||||
),
|
),
|
||||||
)),
|
),
|
||||||
chalk_ir::Scalar::Uint(i) => Layout::scalar(dl, scalar_unit(
|
),
|
||||||
|
chalk_ir::Scalar::Uint(i) => Layout::scalar(
|
||||||
|
dl,
|
||||||
|
scalar_unit(
|
||||||
dl,
|
dl,
|
||||||
Primitive::Int(
|
Primitive::Int(
|
||||||
match i {
|
match i {
|
||||||
|
|
@ -219,8 +223,11 @@ pub fn layout_of_ty_query(
|
||||||
},
|
},
|
||||||
false,
|
false,
|
||||||
),
|
),
|
||||||
)),
|
),
|
||||||
chalk_ir::Scalar::Float(f) => Layout::scalar(dl, scalar_unit(
|
),
|
||||||
|
chalk_ir::Scalar::Float(f) => Layout::scalar(
|
||||||
|
dl,
|
||||||
|
scalar_unit(
|
||||||
dl,
|
dl,
|
||||||
Primitive::Float(match f {
|
Primitive::Float(match f {
|
||||||
FloatTy::F16 => Float::F16,
|
FloatTy::F16 => Float::F16,
|
||||||
|
|
@ -228,7 +235,8 @@ pub fn layout_of_ty_query(
|
||||||
FloatTy::F64 => Float::F64,
|
FloatTy::F64 => Float::F64,
|
||||||
FloatTy::F128 => Float::F128,
|
FloatTy::F128 => Float::F128,
|
||||||
}),
|
}),
|
||||||
)),
|
),
|
||||||
|
),
|
||||||
},
|
},
|
||||||
TyKind::Tuple(len, tys) => {
|
TyKind::Tuple(len, tys) => {
|
||||||
let kind = if *len == 0 { StructKind::AlwaysSized } else { StructKind::MaybeUnsized };
|
let kind = if *len == 0 { StructKind::AlwaysSized } else { StructKind::MaybeUnsized };
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue