summaryrefslogtreecommitdiff
path: root/compiler/rustc_middle
diff options
context:
space:
mode:
authorMichael Goulet <michael@errs.io>2023-05-12 00:58:02 +0000
committerMichael Goulet <michael@errs.io>2023-05-12 00:58:06 +0000
commit3009cb3f6bded69d83b1d5fe22b26612496e87fc (patch)
treef68424634c83be60a1c4f2a299003d2b6f0d3bfd /compiler/rustc_middle
parent2a8221dbdfd180a2d56d4b0089f4f3952d8c2bcd (diff)
downloadrust-3009cb3f6bded69d83b1d5fe22b26612496e87fc.tar.gz
Don't ICE in layout computation for placeholder types
Diffstat (limited to 'compiler/rustc_middle')
-rw-r--r--compiler/rustc_middle/src/ty/sty.rs6
1 files changed, 2 insertions, 4 deletions
diff --git a/compiler/rustc_middle/src/ty/sty.rs b/compiler/rustc_middle/src/ty/sty.rs
index 8d0737e1eee..488d83b5f67 100644
--- a/compiler/rustc_middle/src/ty/sty.rs
+++ b/compiler/rustc_middle/src/ty/sty.rs
@@ -2366,13 +2366,11 @@ impl<'tcx> Ty<'tcx> {
ty::Adt(def, _substs) => def.sized_constraint(tcx).0.is_empty(),
- ty::Alias(..) | ty::Param(_) => false,
+ ty::Alias(..) | ty::Param(_) | ty::Placeholder(..) => false,
ty::Infer(ty::TyVar(_)) => false,
- ty::Bound(..)
- | ty::Placeholder(..)
- | ty::Infer(ty::FreshTy(_) | ty::FreshIntTy(_) | ty::FreshFloatTy(_)) => {
+ ty::Bound(..) | ty::Infer(ty::FreshTy(_) | ty::FreshIntTy(_) | ty::FreshFloatTy(_)) => {
bug!("`is_trivially_sized` applied to unexpected type: {:?}", self)
}
}