1
Fork 0

Change FIXME message to indicate plan to handle inference variables within this code path.

This commit is contained in:
Ben Lewis 2020-01-26 19:37:32 +13:00
parent b8523fd0ec
commit ea18cd7c64

View file

@ -2488,8 +2488,8 @@ impl<'tcx> Const<'tcx> {
// HACK(eddyb) when substs contain e.g. inference variables,
// attempt using identity substs instead, that will succeed
// when the expression doesn't depend on any parameters.
// FIXME(eddyb) make `const_eval` a canonical query instead,
// that would properly handle inference variables in `substs`.
// FIXME(eddyb, skinny121) pass `InferCtxt` into here when it's available, so that
// we can call `infcx.const_eval_resolve` which handles inference variables.
if substs.has_local_value() {
let identity_substs = InternalSubsts::identity_for_item(tcx, did);
// The `ParamEnv` needs to match the `identity_substs`.