Auto merge of #87246 - rust-lang:placeholder-pretty, r=nikomatsakis
When pretty printing, name placeholders as bound regions Split from #85499 When we see a placeholder that we are going to print, treat it as a bound var (and add it to a `for<...>`
This commit is contained in:
commit
8024983ea7
8 changed files with 118 additions and 46 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue