about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorDeadbeef <ent3rm4n@gmail.com>2021-11-29 20:42:16 +0800
committerDeadbeef <ent3rm4n@gmail.com>2021-11-29 21:19:50 +0800
commitfdf5322169e85d9c5caaff6359d71f182afa202b (patch)
tree27d4a240d2a2c1be14e6a65d74da51eb78bde8fd /src
parentf394bb57bb800be024e95e624d96bc698e04dde3 (diff)
Fix tools
Diffstat (limited to 'src')
-rw-r--r--src/librustdoc/clean/blanket_impl.rs5
-rw-r--r--src/tools/clippy/clippy_lints/src/future_not_send.rs4
2 files changed, 5 insertions, 4 deletions
diff --git a/src/librustdoc/clean/blanket_impl.rs b/src/librustdoc/clean/blanket_impl.rs
index f44589f6067..7ca5cb4bd42 100644
--- a/src/librustdoc/clean/blanket_impl.rs
+++ b/src/librustdoc/clean/blanket_impl.rs
@@ -3,7 +3,7 @@ use rustc_hir as hir;
 use rustc_infer::infer::{InferOk, TyCtxtInferExt};
 use rustc_infer::traits;
 use rustc_middle::ty::subst::Subst;
-use rustc_middle::ty::{ToPredicate, WithConstness};
+use rustc_middle::ty::ToPredicate;
 use rustc_span::DUMMY_SP;
 
 use super::*;
@@ -66,7 +66,8 @@ impl<'a, 'tcx> BlanketImplFinder<'a, 'tcx> {
                             .into_iter()
                             .chain(Some(
                                 ty::Binder::dummy(trait_ref)
-                                    .without_const()
+                                    .to_poly_trait_predicate()
+                                    .map_bound(ty::PredicateKind::Trait)
                                     .to_predicate(infcx.tcx),
                             ));
                         for predicate in predicates {
diff --git a/src/tools/clippy/clippy_lints/src/future_not_send.rs b/src/tools/clippy/clippy_lints/src/future_not_send.rs
index 6b2ac985555..a9297adb426 100644
--- a/src/tools/clippy/clippy_lints/src/future_not_send.rs
+++ b/src/tools/clippy/clippy_lints/src/future_not_send.rs
@@ -67,8 +67,8 @@ impl<'tcx> LateLintPass<'tcx> for FutureNotSend {
             let mut is_future = false;
             for &(p, _span) in preds {
                 let p = p.subst(cx.tcx, subst);
-                if let Some(trait_ref) = p.to_opt_poly_trait_ref() {
-                    if Some(trait_ref.value.def_id()) == cx.tcx.lang_items().future_trait() {
+                if let Some(trait_pred) = p.to_opt_poly_trait_pred() {
+                    if Some(trait_pred.skip_binder().trait_ref.def_id) == cx.tcx.lang_items().future_trait() {
                         is_future = true;
                         break;
                     }