const_eval_resolve

This commit is contained in:
Bastian Kauschke 2020-07-02 23:56:17 +02:00
parent f2f99be2ff
commit 29de25b8a2

View File

@ -332,7 +332,7 @@ fn fetch_path(&mut self, qpath: &QPath<'_>, id: HirId, ty: Ty<'tcx>) -> Option<C
let result = self
.lcx
.tcx
.const_eval_resolve(self.param_env, def_id, substs, None, None)
.const_eval_resolve(self.param_env, ty::WithOptParam::dummy(def_id), substs, None, None)
.ok()
.map(|val| rustc_middle::ty::Const::from_value(self.lcx.tcx, val, ty))?;
let result = miri_to_const(&result);