about summary refs log tree commit diff
path: root/compiler/rustc_traits
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-11-22 21:09:01 +0000
committerbors <bors@rust-lang.org>2023-11-22 21:09:01 +0000
commit1e9dda77b5b8e690c7e21871bbd2dcf182e1a841 (patch)
treeee39beab49d91d61008866f1818086d19db85c5e /compiler/rustc_traits
parent06d1afe5189bc0830b9b5654fd0ba89e9829f4cd (diff)
parent128feaa2b40d063a834030d3ff9410c9327c5286 (diff)
downloadrust-1e9dda77b5b8e690c7e21871bbd2dcf182e1a841.tar.gz
rust-1e9dda77b5b8e690c7e21871bbd2dcf182e1a841.zip
Auto merge of #118120 - compiler-errors:closure-kind, r=lcnr
Remove `PredicateKind::ClosureKind`

We don't need the `ClosureKind` predicate kind -- instead, `Fn`-family trait goals are left as ambiguous, and we only need to make progress on `FnOnce` projection goals for inference purposes.

This is similar to how we do confirmation of `Fn`-family trait and projection goals in the new trait solver, which also doesn't use the `ClosureKind` predicate.

Some hacky logic is added in the second commit so that we can keep the error messages the same.
Diffstat (limited to 'compiler/rustc_traits')
-rw-r--r--compiler/rustc_traits/src/normalize_erasing_regions.rs1
1 files changed, 0 insertions, 1 deletions
diff --git a/compiler/rustc_traits/src/normalize_erasing_regions.rs b/compiler/rustc_traits/src/normalize_erasing_regions.rs
index cb2a36cb998..06486a100a9 100644
--- a/compiler/rustc_traits/src/normalize_erasing_regions.rs
+++ b/compiler/rustc_traits/src/normalize_erasing_regions.rs
@@ -58,7 +58,6 @@ fn not_outlives_predicate(p: ty::Predicate<'_>) -> bool {
         | ty::PredicateKind::AliasRelate(..)
         | ty::PredicateKind::Clause(ty::ClauseKind::WellFormed(..))
         | ty::PredicateKind::ObjectSafe(..)
-        | ty::PredicateKind::ClosureKind(..)
         | ty::PredicateKind::Subtype(..)
         | ty::PredicateKind::Coerce(..)
         | ty::PredicateKind::Clause(ty::ClauseKind::ConstEvaluatable(..))