1
Fork 0

When pretty printing, name placeholders as bound regions

This commit is contained in:
jackh726 2021-07-18 03:18:05 -04:00
parent eb0b95b55a
commit b9ee2fb6d8
8 changed files with 118 additions and 46 deletions

View file

@ -995,7 +995,7 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
let get_lifetimes = |sig| {
use rustc_hir::def::Namespace;
let mut s = String::new();
let (_, (sig, reg)) = ty::print::FmtPrinter::new(self.tcx, &mut s, Namespace::TypeNS)
let (_, sig, reg) = ty::print::FmtPrinter::new(self.tcx, &mut s, Namespace::TypeNS)
.name_all_regions(sig)
.unwrap();
let lts: Vec<String> = reg.into_iter().map(|(_, kind)| kind.to_string()).collect();