Rollup merge of #114876 - compiler-errors:non-lifetime-binders-sized, r=wesleywiser
Don't ICE in `is_trivially_sized` when encountering late-bound self ty
We can see a bound ty var here:
b531630f42/compiler/rustc_trait_selection/src/traits/query/type_op/prove_predicate.rs (L13-L34)
Fixes #114872
This commit is contained in:
commit
084c87dfea
3 changed files with 32 additions and 2 deletions
|
@ -2827,11 +2827,11 @@ impl<'tcx> Ty<'tcx> {
|
|||
|
||||
ty::Adt(def, _args) => def.sized_constraint(tcx).skip_binder().is_empty(),
|
||||
|
||||
ty::Alias(..) | ty::Param(_) | ty::Placeholder(..) => false,
|
||||
ty::Alias(..) | ty::Param(_) | ty::Placeholder(..) | ty::Bound(..) => false,
|
||||
|
||||
ty::Infer(ty::TyVar(_)) => false,
|
||||
|
||||
ty::Bound(..) | ty::Infer(ty::FreshTy(_) | ty::FreshIntTy(_) | ty::FreshFloatTy(_)) => {
|
||||
ty::Infer(ty::FreshTy(_) | ty::FreshIntTy(_) | ty::FreshFloatTy(_)) => {
|
||||
bug!("`is_trivially_sized` applied to unexpected type: {:?}", self)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue