Skip to content

Commit fdf5322

Browse files
committed
Fix tools
1 parent f394bb5 commit fdf5322

File tree

4 files changed

+9
-8
lines changed

4 files changed

+9
-8
lines changed

compiler/rustc_middle/src/traits/util.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ impl<'tcx> Elaborator<'tcx> {
2626
.predicates
2727
.into_iter()
2828
.flat_map(|(pred, _)| {
29-
pred.subst_supertrait(self.tcx, &trait_ref).to_opt_poly_trait_ref()
29+
pred.subst_supertrait(self.tcx, &trait_ref).to_opt_poly_trait_pred()
3030
})
31-
.map(|t| t.value)
31+
.map(|t| t.map_bound(|pred| pred.trait_ref))
3232
.filter(|supertrait_ref| self.visited.insert(*supertrait_ref));
3333

3434
self.stack.extend(supertrait_refs);

compiler/rustc_middle/src/ty/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1257,11 +1257,11 @@ impl<'a, 'tcx> HashStable<StableHashingContext<'a>> for ParamEnv<'tcx> {
12571257

12581258
impl<'tcx> TypeFoldable<'tcx> for ParamEnv<'tcx> {
12591259
fn super_fold_with<F: ty::fold::TypeFolder<'tcx>>(self, folder: &mut F) -> Result<Self, F::Error> {
1260-
ParamEnv::new(
1260+
Ok(ParamEnv::new(
12611261
self.caller_bounds().fold_with(folder)?,
12621262
self.reveal().fold_with(folder)?,
12631263
self.constness().fold_with(folder)?,
1264-
)
1264+
))
12651265
}
12661266

12671267
fn super_visit_with<V: TypeVisitor<'tcx>>(&self, visitor: &mut V) -> ControlFlow<V::BreakTy> {

src/librustdoc/clean/blanket_impl.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ use rustc_hir as hir;
33
use rustc_infer::infer::{InferOk, TyCtxtInferExt};
44
use rustc_infer::traits;
55
use rustc_middle::ty::subst::Subst;
6-
use rustc_middle::ty::{ToPredicate, WithConstness};
6+
use rustc_middle::ty::ToPredicate;
77
use rustc_span::DUMMY_SP;
88

99
use super::*;
@@ -66,7 +66,8 @@ impl<'a, 'tcx> BlanketImplFinder<'a, 'tcx> {
6666
.into_iter()
6767
.chain(Some(
6868
ty::Binder::dummy(trait_ref)
69-
.without_const()
69+
.to_poly_trait_predicate()
70+
.map_bound(ty::PredicateKind::Trait)
7071
.to_predicate(infcx.tcx),
7172
));
7273
for predicate in predicates {

src/tools/clippy/clippy_lints/src/future_not_send.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,8 @@ impl<'tcx> LateLintPass<'tcx> for FutureNotSend {
6767
let mut is_future = false;
6868
for &(p, _span) in preds {
6969
let p = p.subst(cx.tcx, subst);
70-
if let Some(trait_ref) = p.to_opt_poly_trait_ref() {
71-
if Some(trait_ref.value.def_id()) == cx.tcx.lang_items().future_trait() {
70+
if let Some(trait_pred) = p.to_opt_poly_trait_pred() {
71+
if Some(trait_pred.skip_binder().trait_ref.def_id) == cx.tcx.lang_items().future_trait() {
7272
is_future = true;
7373
break;
7474
}

0 commit comments

Comments
 (0)