Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rustup #1484

Merged
merged 1 commit into from
Jul 23, 2020
Merged

rustup #1484

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion rust-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
567ad7455d5f25f6b38d2fded1cb621e0c34a48b
4825e12fc9c79954aa0fe18f5521efa6c19c7539
4 changes: 2 additions & 2 deletions src/helpers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,14 +92,14 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
/// Helper function to get the `TyAndLayout` of a `libc` type
fn libc_ty_layout(&mut self, name: &str) -> InterpResult<'tcx, TyAndLayout<'tcx>> {
let this = self.eval_context_mut();
let ty = this.resolve_path(&["libc", name]).monomorphic_ty(*this.tcx);
let ty = this.resolve_path(&["libc", name]).ty(*this.tcx, ty::ParamEnv::reveal_all());
this.layout_of(ty)
}

/// Helper function to get the `TyAndLayout` of a `windows` type
fn windows_ty_layout(&mut self, name: &str) -> InterpResult<'tcx, TyAndLayout<'tcx>> {
let this = self.eval_context_mut();
let ty = this.resolve_path(&["std", "sys", "windows", "c", name]).monomorphic_ty(*this.tcx);
let ty = this.resolve_path(&["std", "sys", "windows", "c", name]).ty(*this.tcx, ty::ParamEnv::reveal_all());
this.layout_of(ty)
}

Expand Down
3 changes: 2 additions & 1 deletion src/shims/posix/fs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ use log::trace;

use rustc_data_structures::fx::FxHashMap;
use rustc_target::abi::{Align, LayoutOf, Size};
use rustc_middle::ty;

use crate::*;
use stacked_borrows::Tag;
Expand Down Expand Up @@ -670,7 +671,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
// function and `resolve_path` is returning the latter.
let statx_ty = this
.resolve_path(&["libc", "unix", "linux_like", "linux", "gnu", "statx"])
.monomorphic_ty(*this.tcx);
.ty(*this.tcx, ty::ParamEnv::reveal_all());
let statxbuf_ty = this.tcx.mk_mut_ptr(statx_ty);
let statxbuf_layout = this.layout_of(statxbuf_ty)?;
let statxbuf_imm = ImmTy::from_scalar(statxbuf_scalar, statxbuf_layout);
Expand Down