Skip to content

Commit 39a9512

Browse files
author
The Miri Cronjob Bot
committed
fmt
1 parent cfc5961 commit 39a9512

File tree

3 files changed

+4
-6
lines changed

3 files changed

+4
-6
lines changed

src/tools/miri/src/eval.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ pub fn create_ecx<'tcx>(
274274
tcx,
275275
rustc_span::DUMMY_SP,
276276
typing_env.param_env,
277-
MiriMachine::new(config, layout_cx)
277+
MiriMachine::new(config, layout_cx),
278278
);
279279

280280
// Some parts of initialization require a full `InterpCx`.

src/tools/miri/src/helpers.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,7 @@ pub fn resolve_path<'tcx>(
116116
/// Gets the layout of a type at a path.
117117
#[track_caller]
118118
pub fn path_ty_layout<'tcx>(cx: &impl LayoutOf<'tcx>, path: &[&str]) -> TyAndLayout<'tcx> {
119-
let ty = resolve_path(cx.tcx(), path, Namespace::TypeNS)
120-
.ty(cx.tcx(), cx.typing_env());
119+
let ty = resolve_path(cx.tcx(), path, Namespace::TypeNS).ty(cx.tcx(), cx.typing_env());
121120
cx.layout_of(ty).to_result().ok().unwrap()
122121
}
123122

src/tools/miri/src/machine.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1127,9 +1127,8 @@ impl<'tcx> Machine<'tcx> for MiriMachine<'tcx> {
11271127
};
11281128
let info = ecx.get_alloc_info(alloc_id);
11291129
let def_ty = ecx.tcx.type_of(def_id).instantiate_identity();
1130-
let extern_decl_layout = ecx.tcx.layout_of(
1131-
ecx.typing_env().as_query_input(def_ty)
1132-
).unwrap();
1130+
let extern_decl_layout =
1131+
ecx.tcx.layout_of(ecx.typing_env().as_query_input(def_ty)).unwrap();
11331132
if extern_decl_layout.size != info.size || extern_decl_layout.align.abi != info.align {
11341133
throw_unsup_format!(
11351134
"extern static `{link_name}` has been declared as `{krate}::{name}` \

0 commit comments

Comments
 (0)