Skip to content

Commit dd03c0f

Browse files
committed
Auto merge of rust-lang#91354 - fee1-dead:const_env, r=spastorino
Cleanup: Eliminate ConstnessAnd This is almost a behaviour-free change and purely a refactoring. "almost" because we appear to be using the wrong ParamEnv somewhere already, and this is now exposed by failing a test using the unstable `~const` feature. We most definitely need to review all `without_const` and at some point should probably get rid of many of them by using `TraitPredicate` instead of `TraitRef`. This is a continuation of rust-lang#90274. r? `@oli-obk` cc `@spastorino` `@ecstatic-morse`
2 parents 56533d9 + 99eeb66 commit dd03c0f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

clippy_lints/src/future_not_send.rs

+2-2
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)