Skip to content

Commit

Permalink
Auto merge of #1484 - RalfJung:rustup, r=RalfJung
Browse files Browse the repository at this point in the history
rustup

Following rust-lang/rust#69749 I added some `ty::ParamEnv::reveal_all()` even though @eddyb advised me in the past to avoid those.
  • Loading branch information
bors committed Jul 23, 2020
2 parents c44f1ae + 7d6aec6 commit 67e7eb4
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
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

0 comments on commit 67e7eb4

Please sign in to comment.