about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2019-01-05 01:12:33 +0100
committerMatthias Krüger <matthias.krueger@famsik.de>2019-01-05 01:12:33 +0100
commit33ec4e5220b004e2d491cce7cc9ab95a5c140370 (patch)
tree8ef58a40b49efc9448221e8dc41028ccfea1c922
parentcf3fb908c8479f923fb2518e5cc70f4e6440239f (diff)
downloadrust-33ec4e5220b004e2d491cce7cc9ab95a5c140370.tar.gz
rust-33ec4e5220b004e2d491cce7cc9ab95a5c140370.zip
rustup (don't know the exact PR unfortunately)
-rw-r--r--clippy_lints/src/consts.rs2
-rw-r--r--clippy_lints/src/enum_clike.rs2
2 files changed, 2 insertions, 2 deletions
diff --git a/clippy_lints/src/consts.rs b/clippy_lints/src/consts.rs
index 8369f4b4470..8102a416d82 100644
--- a/clippy_lints/src/consts.rs
+++ b/clippy_lints/src/consts.rs
@@ -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;
                 }
diff --git a/clippy_lints/src/enum_clike.rs b/clippy_lints/src/enum_clike.rs
index 29038cda869..78cade1f2fb 100644
--- a/clippy_lints/src/enum_clike.rs
+++ b/clippy_lints/src/enum_clike.rs
@@ -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() {