Skip to content

Commit

Permalink
Get rid of one more useless lift invocation
Browse files Browse the repository at this point in the history
  • Loading branch information
oli-obk committed Aug 5, 2019
1 parent f207933 commit bd57498
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/librustc/ty/sty.rs
Expand Up @@ -2305,8 +2305,7 @@ impl<'tcx> Const<'tcx> {
// because it tries to relate an `Infer` to a `Param`.
ConstValue::Unevaluated(did, substs) => {
// if `substs` has no unresolved components, use and empty param_env
let pem_and_substs = param_env.with_reveal_all().and(substs);
let (param_env, substs) = tcx.lift_to_global(&pem_and_substs).unwrap().into_parts();
let (param_env, substs) = param_env.with_reveal_all().and(substs).into_parts();
// try to resolve e.g. associated constants to their definition on an impl
let instance = ty::Instance::resolve(tcx, param_env, did, substs)?;
let gid = GlobalId {
Expand Down

0 comments on commit bd57498

Please sign in to comment.