about summary refs log tree commit diff
path: root/compiler/rustc_middle/src
diff options
context:
space:
mode:
authorMichael Goulet <michael@errs.io>2023-08-16 00:45:02 +0000
committerMichael Goulet <michael@errs.io>2023-08-16 01:57:33 +0000
commitc31aedf47f946e616169d4e0b95f898981b4e84b (patch)
treec7f811c4ba294c3722a0ece7987fdb6a47bae3ee /compiler/rustc_middle/src
parentc57393e4f8b88444fbf0985a81a2d662862f2733 (diff)
downloadrust-c31aedf47f946e616169d4e0b95f898981b4e84b.tar.gz
rust-c31aedf47f946e616169d4e0b95f898981b4e84b.zip
Don't ICE in is_trivially_sized when encountering late-bound self ty
Diffstat (limited to 'compiler/rustc_middle/src')
-rw-r--r--compiler/rustc_middle/src/ty/sty.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_middle/src/ty/sty.rs b/compiler/rustc_middle/src/ty/sty.rs
index e6baa624205..0291cdd6c57 100644
--- a/compiler/rustc_middle/src/ty/sty.rs
+++ b/compiler/rustc_middle/src/ty/sty.rs
@@ -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)
             }
         }