Skip to content

Commit

Permalink
Auto merge of rust-lang#91354 - fee1-dead:const_env, r=spastorino
Browse files Browse the repository at this point in the history
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`
  • Loading branch information
bors committed Dec 2, 2021
2 parents 56533d9 + 99eeb66 commit dd03c0f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions clippy_lints/src/future_not_send.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit dd03c0f

Please sign in to comment.