Skip to content

Commit

Permalink
Erase regions before calling tcx.resolve_instance
Browse files Browse the repository at this point in the history
  • Loading branch information
Aaron1011 committed Feb 28, 2020
1 parent 8035fdb commit 2bbc172
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/librustc/ty/instance.rs
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ impl<'tcx> Instance<'tcx> {
def_id: DefId,
substs: SubstsRef<'tcx>,
) -> Option<Instance<'tcx>> {
tcx.resolve_instance((param_env, def_id, substs))
tcx.resolve_instance((tcx.erase_regions(&param_env), def_id, tcx.erase_regions(&substs)))
}

pub fn resolve_for_fn_ptr(
Expand Down

0 comments on commit 2bbc172

Please sign in to comment.