rustup (don't know the exact PR unfortunately)

This commit is contained in:
Matthias Krüger 2019-01-05 01:12:33 +01:00
parent cf3fb908c8
commit 33ec4e5220
2 changed files with 2 additions and 2 deletions

View file

@ -304,7 +304,7 @@ impl<'c, 'cc> ConstEvalLateContext<'c, 'cc> {
};
let result = self.tcx.const_eval(self.param_env.and(gid)).ok()?;
let ret = miri_to_const(self.tcx, result);
let ret = miri_to_const(self.tcx, &result);
if ret.is_some() {
self.needed_resolution = true;
}

View file

@ -70,7 +70,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for UnportableVariant {
promoted: None,
};
let constant = cx.tcx.const_eval(param_env.and(c_id)).ok();
if let Some(Constant::Int(val)) = constant.and_then(|c| miri_to_const(cx.tcx, c)) {
if let Some(Constant::Int(val)) = constant.and_then(|c| miri_to_const(cx.tcx, &c)) {
let mut ty = cx.tcx.type_of(def_id);
if let ty::Adt(adt, _) = ty.sty {
if adt.is_enum() {