From a0ebb2ed8b59e8eec9add6acda0673dcf468596f Mon Sep 17 00:00:00 2001 From: Deadbeef Date: Thu, 21 Jul 2022 07:45:49 +0000 Subject: change `map_bound(|_| x` to `rebind(x` --- compiler/rustc_middle/src/ty/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'compiler/rustc_middle/src') diff --git a/compiler/rustc_middle/src/ty/mod.rs b/compiler/rustc_middle/src/ty/mod.rs index 893700ca5d8..12da0b8b3d8 100644 --- a/compiler/rustc_middle/src/ty/mod.rs +++ b/compiler/rustc_middle/src/ty/mod.rs @@ -580,7 +580,7 @@ impl<'tcx> Predicate<'tcx> { if let PredicateKind::Trait(TraitPredicate { trait_ref, constness, polarity }) = self.kind().skip_binder() && constness != BoundConstness::NotConst { - self = tcx.mk_predicate(self.kind().map_bound(|_| PredicateKind::Trait(TraitPredicate { + self = tcx.mk_predicate(self.kind().rebind(PredicateKind::Trait(TraitPredicate { trait_ref, constness: BoundConstness::NotConst, polarity, -- cgit 1.4.1-3-g733a5