Skip to content

Commit 5ff7eef

Browse files
committed
rustup; fix for TyLayout rename
1 parent 2d50873 commit 5ff7eef

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

rust-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
150322f86d441752874a8bed603d71119f190b8b
1+
0afdf43dc1d9be4c8b422840166b51dd99e56a16

src/helpers.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use std::mem;
44
use rustc::mir;
55
use rustc::ty::{
66
self,
7-
layout::{self, LayoutOf, Size, TyLayout},
7+
layout::{self, LayoutOf, Size, TyAndLayout},
88
List, TyCtxt,
99
};
1010
use rustc_hir::def_id::{DefId, CRATE_DEF_INDEX};
@@ -84,8 +84,8 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
8484
self.eval_libc(name)?.to_i32()
8585
}
8686

87-
/// Helper function to get the `TyLayout` of a `libc` type
88-
fn libc_ty_layout(&mut self, name: &str) -> InterpResult<'tcx, TyLayout<'tcx>> {
87+
/// Helper function to get the `TyAndLayout` of a `libc` type
88+
fn libc_ty_layout(&mut self, name: &str) -> InterpResult<'tcx, TyAndLayout<'tcx>> {
8989
let this = self.eval_context_mut();
9090
let ty = this.resolve_path(&["libc", name]).monomorphic_ty(*this.tcx);
9191
this.layout_of(ty)
@@ -469,7 +469,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
469469

470470
pub fn immty_from_int_checked<'tcx>(
471471
int: impl Into<i128>,
472-
layout: TyLayout<'tcx>,
472+
layout: TyAndLayout<'tcx>,
473473
) -> InterpResult<'tcx, ImmTy<'tcx, Tag>> {
474474
let int = int.into();
475475
Ok(ImmTy::try_from_int(int, layout).ok_or_else(|| {
@@ -479,7 +479,7 @@ pub fn immty_from_int_checked<'tcx>(
479479

480480
pub fn immty_from_uint_checked<'tcx>(
481481
int: impl Into<u128>,
482-
layout: TyLayout<'tcx>,
482+
layout: TyAndLayout<'tcx>,
483483
) -> InterpResult<'tcx, ImmTy<'tcx, Tag>> {
484484
let int = int.into();
485485
Ok(ImmTy::try_from_uint(int, layout).ok_or_else(|| {

0 commit comments

Comments
 (0)