Rollup merge of #76581 - lcnr:bound-too-generic, r=eddyb
do not ICE on bound variables, return `TooGeneric` instead fixes #73260, fixes #74634, fixes #76595 r? @nikomatsakis
This commit is contained in:
commit
30f1bab7e6
8 changed files with 128 additions and 6 deletions
|
@ -1259,11 +1259,11 @@ impl<'tcx> LayoutCx<'tcx, TyCtxt<'tcx>> {
|
|||
tcx.layout_raw(param_env.and(normalized))?
|
||||
}
|
||||
|
||||
ty::Bound(..) | ty::Placeholder(..) | ty::GeneratorWitness(..) | ty::Infer(_) => {
|
||||
ty::Placeholder(..) | ty::GeneratorWitness(..) | ty::Infer(_) => {
|
||||
bug!("Layout::compute: unexpected type `{}`", ty)
|
||||
}
|
||||
|
||||
ty::Param(_) | ty::Error(_) => {
|
||||
ty::Bound(..) | ty::Param(_) | ty::Error(_) => {
|
||||
return Err(LayoutError::Unknown(ty));
|
||||
}
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue