Rollup merge of #108189 - compiler-errors:non_lifetime_binders-bound-stuff, r=jackh726
Fix some more `non_lifetime_binders` stuff with higher-ranked trait bounds 1. When assembling candidates for `for<T> T: Sized`, we can't ICE because the self-type is a bound type. 2. Fix an issue where, when canonicalizing in non-universe preserving mode, we don't actually set the universe for placeholders to the root even though we do the same for region vars. 3. Make `Placeholder("T")` format like `T` in error messages. Fixes #108180 Fixes #108182 r? types
This commit is contained in:
commit
c5d5c57666
5 changed files with 103 additions and 9 deletions
|
@ -735,7 +735,10 @@ pub trait PrettyPrinter<'tcx>:
|
|||
p!(print(data))
|
||||
}
|
||||
}
|
||||
ty::Placeholder(placeholder) => p!(write("Placeholder({:?})", placeholder)),
|
||||
ty::Placeholder(placeholder) => match placeholder.name {
|
||||
ty::BoundTyKind::Anon(_) => p!(write("Placeholder({:?})", placeholder)),
|
||||
ty::BoundTyKind::Param(_, name) => p!(write("{}", name)),
|
||||
},
|
||||
ty::Alias(ty::Opaque, ty::AliasTy { def_id, substs, .. }) => {
|
||||
// We use verbose printing in 'NO_QUERIES' mode, to
|
||||
// avoid needing to call `predicates_of`. This should
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue