Auto merge of #1484 - RalfJung:rustup, r=RalfJung

rustup

Following https://github.com/rust-lang/rust/pull/69749 I added some `ty::ParamEnv::reveal_all()` even though @eddyb advised me in the past to avoid those.
This commit is contained in:
bors 2020-07-23 08:41:34 +00:00
commit 67e7eb4b9c
3 changed files with 5 additions and 4 deletions

View File

@ -1 +1 @@
567ad7455d5f25f6b38d2fded1cb621e0c34a48b
4825e12fc9c79954aa0fe18f5521efa6c19c7539

View File

@ -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)
}

View File

@ -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;
@ -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);