Skip to content

Commit 33ec4e5

Browse files
committed
rustup (don't know the exact PR unfortunately)
1 parent cf3fb90 commit 33ec4e5

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

clippy_lints/src/consts.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ impl<'c, 'cc> ConstEvalLateContext<'c, 'cc> {
304304
};
305305

306306
let result = self.tcx.const_eval(self.param_env.and(gid)).ok()?;
307-
let ret = miri_to_const(self.tcx, result);
307+
let ret = miri_to_const(self.tcx, &result);
308308
if ret.is_some() {
309309
self.needed_resolution = true;
310310
}

clippy_lints/src/enum_clike.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for UnportableVariant {
7070
promoted: None,
7171
};
7272
let constant = cx.tcx.const_eval(param_env.and(c_id)).ok();
73-
if let Some(Constant::Int(val)) = constant.and_then(|c| miri_to_const(cx.tcx, c)) {
73+
if let Some(Constant::Int(val)) = constant.and_then(|c| miri_to_const(cx.tcx, &c)) {
7474
let mut ty = cx.tcx.type_of(def_id);
7575
if let ty::Adt(adt, _) = ty.sty {
7676
if adt.is_enum() {

0 commit comments

Comments
 (0)