Skip to content

Commit dd1537c

Browse files
committed
Fix TypingEnv formatting to match rustfmt requirements
1 parent d8785b9 commit dd1537c

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

compiler/rustc_const_eval/src/util/alignment.rs

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -76,10 +76,8 @@ fn get_element_alignment<'tcx>(tcx: TyCtxt<'tcx>, ty: ty::Ty<'tcx>) -> Option<Al
7676
ty::Array(element_ty, _) => {
7777
// For arrays, the alignment is the same as the element type
7878
let param_env = ty::ParamEnv::empty();
79-
let typing_env = ty::TypingEnv {
80-
typing_mode: ty::TypingMode::non_body_analysis(),
81-
param_env,
82-
};
79+
let typing_env =
80+
ty::TypingEnv { typing_mode: ty::TypingMode::non_body_analysis(), param_env };
8381
match tcx.layout_of(typing_env.as_query_input(*element_ty)) {
8482
Ok(layout) => Some(layout.align.abi),
8583
Err(_) => None,
@@ -88,10 +86,8 @@ fn get_element_alignment<'tcx>(tcx: TyCtxt<'tcx>, ty: ty::Ty<'tcx>) -> Option<Al
8886
ty::Slice(element_ty) => {
8987
// For slices, the alignment is the same as the element type
9088
let param_env = ty::ParamEnv::empty();
91-
let typing_env = ty::TypingEnv {
92-
typing_mode: ty::TypingMode::non_body_analysis(),
93-
param_env,
94-
};
89+
let typing_env =
90+
ty::TypingEnv { typing_mode: ty::TypingMode::non_body_analysis(), param_env };
9591
match tcx.layout_of(typing_env.as_query_input(*element_ty)) {
9692
Ok(layout) => Some(layout.align.abi),
9793
Err(_) => None,

0 commit comments

Comments
 (0)