Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
The Miri Cronjob Bot committed Nov 19, 2024
1 parent 17dbe33 commit 92b5420
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/eval.rs
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ pub fn create_ecx<'tcx>(
tcx,
rustc_span::DUMMY_SP,
typing_env.param_env,
MiriMachine::new(config, layout_cx)
MiriMachine::new(config, layout_cx),
);

// Some parts of initialization require a full `InterpCx`.
Expand Down
3 changes: 1 addition & 2 deletions src/helpers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,7 @@ pub fn resolve_path<'tcx>(
/// Gets the layout of a type at a path.
#[track_caller]
pub fn path_ty_layout<'tcx>(cx: &impl LayoutOf<'tcx>, path: &[&str]) -> TyAndLayout<'tcx> {
let ty = resolve_path(cx.tcx(), path, Namespace::TypeNS)
.ty(cx.tcx(), cx.typing_env());
let ty = resolve_path(cx.tcx(), path, Namespace::TypeNS).ty(cx.tcx(), cx.typing_env());
cx.layout_of(ty).to_result().ok().unwrap()
}

Expand Down
5 changes: 2 additions & 3 deletions src/machine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1127,9 +1127,8 @@ impl<'tcx> Machine<'tcx> for MiriMachine<'tcx> {
};
let info = ecx.get_alloc_info(alloc_id);
let def_ty = ecx.tcx.type_of(def_id).instantiate_identity();
let extern_decl_layout = ecx.tcx.layout_of(
ecx.typing_env().as_query_input(def_ty)
).unwrap();
let extern_decl_layout =
ecx.tcx.layout_of(ecx.typing_env().as_query_input(def_ty)).unwrap();
if extern_decl_layout.size != info.size || extern_decl_layout.align.abi != info.align {
throw_unsup_format!(
"extern static `{link_name}` has been declared as `{krate}::{name}` \
Expand Down

0 comments on commit 92b5420

Please sign in to comment.