summaryrefslogtreecommitdiffstats
path: root/compiler/rustc_borrowck/src/nll.rs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/rustc_borrowck/src/nll.rs')
-rw-r--r--compiler/rustc_borrowck/src/nll.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/compiler/rustc_borrowck/src/nll.rs b/compiler/rustc_borrowck/src/nll.rs
index 679a19710..3f60f5aca 100644
--- a/compiler/rustc_borrowck/src/nll.rs
+++ b/compiler/rustc_borrowck/src/nll.rs
@@ -10,6 +10,7 @@ use rustc_middle::mir::{
Body, ClosureOutlivesSubject, ClosureRegionRequirements, LocalKind, Location, Promoted,
START_BLOCK,
};
+use rustc_middle::ty::print::with_no_trimmed_paths;
use rustc_middle::ty::{self, OpaqueHiddenType, TyCtxt};
use rustc_span::symbol::sym;
use std::env;
@@ -441,7 +442,10 @@ fn for_each_region_constraint<'tcx>(
let subject = match req.subject {
ClosureOutlivesSubject::Region(subject) => format!("{subject:?}"),
ClosureOutlivesSubject::Ty(ty) => {
- format!("{:?}", ty.instantiate(tcx, |vid| ty::Region::new_var(tcx, vid)))
+ with_no_trimmed_paths!(format!(
+ "{}",
+ ty.instantiate(tcx, |vid| ty::Region::new_var(tcx, vid))
+ ))
}
};
with_msg(format!("where {}: {:?}", subject, req.outlived_free_region,))?;