Change:
File: auto-reduced (treereduce-rust): original: Version information ` Command: <!-- Include a backtrace in the code block by setting in your environment. E.g. . --<details<summary<strongProgram output</strong</summary<p</p</details
Regression in cc :sweat_smile:
I knew this was a source of ICEs Most of these should already be reachable if they are in the body of a constant used in an array length. If you want to try fuzzing by sticking code into a const body...

Discussion:
use rustc_middle::mir::ConstraintCategory; use rustc_middle::traits::query::OutlivesBound; use rustc_middle::ty::{self, RegionVid, Ty}; <del> use rustc_span::{Span, DUMMY_SP}; </del> <ins> use rustc_span::{ErrorGuaranteed, Span, DUMMY_SP}; </ins> use rustc_trait_selection::traits::query::type_op::{self, TypeOp}; use std::rc::Rc; use type_op::TypeOpOutput;

.param_env .and(type_op::implied_outlives_bounds::ImpliedOutlivesBounds { ty }) .fully_perform(self.infcx, DUMMY_SP) <del> .unwrap_or_else(|_| bug!("failed to compute implied bounds {:?}", ty)); </del> <ins> .map_err(|_: ErrorGuaranteed| debug!("failed to compute implied bounds {:?}", ty)) .ok()?; </ins> debug!(?bounds, ?constraints); self.add_outlives_bounds(bounds); constraints

<ins> // edition:2018 #![feature(unboxed_closures)] use std::future::Future; async fn wrapper<F>(f: F) //~^ ERROR: expected a `FnOnce<(&'a mut i32,)>` closure, found `i32` //~| ERROR: expected a `FnOnce<(&'a mut i32,)>` closure, found `i32` //~| ERROR: expected a `FnOnce<(&'a mut i32,)>` closure, found `i32` where F:, for<'a> <i32 as FnOnce<(&'a mut i32,)>>::Output: Future<Output = ()> + 'a, { //~^ ERROR: expected a `FnOnce<(&'a mut i32,)>` closure, found `i32` let mut i = 41; &mut i; } fn main() {} </ins>

<ins> error[E0277]: expected a `FnOnce<(&'a mut i32,)>` closure, found `i32` --> $DIR/issue-76168-hr-outlives-3.rs:6:1 | LL | / async fn wrapper<F>(f: F) LL | | LL | | LL | | LL | | where LL | |     F:, LL | |     for<'a> <i32 as FnOnce<(&'a mut i32,)>>::Output: Future<Output = ()> + 'a, | |______________________________________________________________________________^ expected an `FnOnce<(&'a mut i32,)>` closure, found `i32` | = help: the trait `for<'a> FnOnce<(&'a mut i32,)>` is not implemented for `i32` error[E0277]: expected a `FnOnce<(&'a mut i32,)>` closure, found `i32` --> $DIR/issue-76168-hr-outlives-3.rs:6:10 | LL | async fn wrapper<F>(f: F) |          ^^^^^^^ expected an `FnOnce<(&'a mut i32,)>` closure, found `i32` | = help: the trait `for<'a> FnOnce<(&'a mut i32,)>` is not implemented for `i32` error[E0277]: expected a `FnOnce<(&'a mut i32,)>` closure, found `i32` --> $DIR/issue-76168-hr-outlives-3.rs:13:1 | LL | / { LL | | LL | |     let mut i = 41; LL | |     &mut i; LL | | } | |_^ expected an `FnOnce<(&'a mut i32,)>` closure, found `i32` | = help: the trait `for<'a> FnOnce<(&'a mut i32,)>` is not implemented for `i32` error[E0277]: expected a `FnOnce<(&'a mut i32,)>` closure, found `i32` --> $DIR/issue-76168-hr-outlives-3.rs:6:1 | LL | / async fn wrapper<F>(f: F) LL | | LL | | LL | | LL | | where LL | |     F:, LL | |     for<'a> <i32 as FnOnce<(&'a mut i32,)>>::Output: Future<Output = ()> + 'a, | |______________________________________________________________________________^ expected an `FnOnce<(&'a mut i32,)>` closure, found `i32` | = help: the trait `for<'a> FnOnce<(&'a mut i32,)>` is not implemented for `i32` error: aborting due to 4 previous errors For more information about this error, try `rustc --explain E0277`. </ins>