Skip to content

Commit

Permalink
Change FIXME message to indicate plan to handle inference variables w…
Browse files Browse the repository at this point in the history
…ithin this code path.
  • Loading branch information
skinnyBat committed Feb 20, 2020
1 parent b8523fd commit ea18cd7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/librustc/ty/sty.rs
Expand Up @@ -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`.
Expand Down

0 comments on commit ea18cd7

Please sign in to comment.