about summary refs log tree commit diff
path: root/compiler/rustc_trait_selection/src/traits/auto_trait.rs
diff options
context:
space:
mode:
authorMichael Goulet <michael@errs.io>2023-05-09 18:56:43 +0000
committerMichael Goulet <michael@errs.io>2023-05-25 03:19:15 +0000
commit4d80b8090c30980c03ff4bb6f47a7560ffaa68a4 (patch)
treed45cf4788222a3542ea503f8083f516ecbb04855 /compiler/rustc_trait_selection/src/traits/auto_trait.rs
parent7664dfe4331265d0b2b1ffb89c92d443886bec0b (diff)
downloadrust-4d80b8090c30980c03ff4bb6f47a7560ffaa68a4.tar.gz
rust-4d80b8090c30980c03ff4bb6f47a7560ffaa68a4.zip
Pull out logic from #111131, plus some new logic in EvalCtxt::normalize_opaque_type
Co-authored-by: lcnr <rust@lcnr.de>
Diffstat (limited to 'compiler/rustc_trait_selection/src/traits/auto_trait.rs')
-rw-r--r--compiler/rustc_trait_selection/src/traits/auto_trait.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/compiler/rustc_trait_selection/src/traits/auto_trait.rs b/compiler/rustc_trait_selection/src/traits/auto_trait.rs
index 183c2401fc3..62d2aad5277 100644
--- a/compiler/rustc_trait_selection/src/traits/auto_trait.rs
+++ b/compiler/rustc_trait_selection/src/traits/auto_trait.rs
@@ -834,8 +834,10 @@ impl<'tcx> AutoTraitFinder<'tcx> {
                 | ty::PredicateKind::Subtype(..)
                 // FIXME(generic_const_exprs): you can absolutely add this as a where clauses
                 | ty::PredicateKind::ConstEvaluatable(..)
-                | ty::PredicateKind::Coerce(..)
-                | ty::PredicateKind::TypeWellFormedFromEnv(..) => {}
+                | ty::PredicateKind::Coerce(..) => {}
+                ty::PredicateKind::TypeWellFormedFromEnv(..) => {
+                    bug!("predicate should only exist in the environment: {bound_predicate:?}")
+                }
                 ty::PredicateKind::Ambiguous => return false,
             };
         }