]> git.lizzy.rs Git - rust.git/blobdiff - clippy_utils/src/consts.rs
Add new lint `if_then_panic`
[rust.git] / clippy_utils / src / consts.rs
index 9ba1381da659397d6d500ba7cc1e9fbe6de28198..8bf31807d55d1441d74e503a42e29334aee365f0 100644 (file)
@@ -346,11 +346,7 @@ fn fetch_path(&mut self, qpath: &QPath<'_>, id: HirId, ty: Ty<'tcx>) -> Option<C
                     .tcx
                     .const_eval_resolve(
                         self.param_env,
-                        ty::Unevaluated {
-                            def: ty::WithOptConstParam::unknown(def_id),
-                            substs,
-                            promoted: None,
-                        },
+                        ty::Unevaluated::new(ty::WithOptConstParam::unknown(def_id), substs),
                         None,
                     )
                     .ok()