summaryrefslogtreecommitdiffstats
path: root/compiler/rustc_infer/src/infer/region_constraints/leak_check.rs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/rustc_infer/src/infer/region_constraints/leak_check.rs')
-rw-r--r--compiler/rustc_infer/src/infer/region_constraints/leak_check.rs7
1 files changed, 2 insertions, 5 deletions
diff --git a/compiler/rustc_infer/src/infer/region_constraints/leak_check.rs b/compiler/rustc_infer/src/infer/region_constraints/leak_check.rs
index e413b2bb5..b8ba98fc0 100644
--- a/compiler/rustc_infer/src/infer/region_constraints/leak_check.rs
+++ b/compiler/rustc_infer/src/infer/region_constraints/leak_check.rs
@@ -290,9 +290,9 @@ impl<'me, 'tcx> LeakCheck<'me, 'tcx> {
) -> TypeError<'tcx> {
debug!("error: placeholder={:?}, other_region={:?}", placeholder, other_region);
if self.overly_polymorphic {
- TypeError::RegionsOverlyPolymorphic(placeholder.name, other_region)
+ TypeError::RegionsOverlyPolymorphic(placeholder.bound.kind, other_region)
} else {
- TypeError::RegionsInsufficientlyPolymorphic(placeholder.name, other_region)
+ TypeError::RegionsInsufficientlyPolymorphic(placeholder.bound.kind, other_region)
}
}
}
@@ -424,9 +424,6 @@ impl<'tcx> MiniGraph<'tcx> {
&AddConstraint(Constraint::RegSubReg(a, b)) => {
each_edge(a, b);
}
- &AddGiven(a, b) => {
- each_edge(a, tcx.mk_re_var(b));
- }
&AddVerify(i) => span_bug!(
verifys[i].origin.span(),
"we never add verifications while doing higher-ranked things",