Change:
Hyper fails to compile on Rust master () <details</details
fyi
I also get this with on futures-rs <details</details
getting this while trying to compile rust itself(): <details</details
Confirming bisection range is
guessing it's PR attempting rust compilation with reverted like so: <details</detailsthis might take a while...
It's not it, surprisingly enough(for me). (manually)Reverting that PR fails the same. (that is, applied this on top of rust commit ) <details</details<details</details
? This PR adds to typeck-table which is stable-hashed, and the hyper ICE is happening on by querying that table, which looks relevant.
I've reversed-applied the patch from (aka reverted PR ) on top of rust like this , and the results are(74mins later, at least): it passed!(failed later, on clippy_lints, but that's unrelated) So that's the problematic PR, thanks Since rust got updated compared to my previous try, I'll re-apply this PR on top of what already worked just now to see if it indeed fails with it! <sWill post new comment with the update.</sConfirmed the ICE is back with that PR, using 's test-case: <details</details
Minimized test-case:
Thanks self-assigning to look into this (since I caused it with ) - if anyone else wants to look into fixing also, please feel free.
I have a WIP fix:

Discussion:
pub scope_span: Option<Span>, } <ins> BraceStructTypeFoldableImpl! { impl<'tcx> TypeFoldable<'tcx> for GeneratorInteriorTypeCause<'tcx> { ty, span, scope_span } } </ins> #[derive(RustcEncodable, RustcDecodable, Debug)] pub struct TypeckTables<'tcx> { /// The HirId::owner all ItemLocalIds in this table are relative to.

// Sort types by insertion order types.sort_by_key(|t| t.1); <del> // Store the generator types and spans into the tables for this generator. let interior_types = types.iter().cloned().map(|t| t.0).collect::<Vec<_>>(); visitor.fcx.inh.tables.borrow_mut().generator_interior_types = interior_types; // Extract type components let type_list = fcx.tcx.mk_type_list(types.into_iter().map(|t| (t.0).ty)); </del> // The types in the generator interior contain lifetimes local to the generator itself, // which should not be exposed outside of the generator. Therefore, we replace these // lifetimes with existentially-bound lifetimes, which reflect the exact value of the

// if a Sync generator contains an &'α T, we need to check whether &'α T: Sync), // so knowledge of the exact relationships between them isn't particularly important. <del> debug!("types in generator {:?}, span = {:?}", type_list, body.value.span); </del> <ins> debug!("types in generator {:?}, span = {:?}", types, body.value.span); </ins> // Replace all regions inside the generator interior with late bound regions // Note that each region slot in the types gets a new fresh late bound region, // which means that none of the regions inside relate to any other, even if // typeck had previously found constraints that would cause them to be related. let mut counter = 0; <del> let type_list = fcx.tcx.fold_regions(&type_list, &mut false, |_, current_depth| { </del> <ins> let types = fcx.tcx.fold_regions(&types, &mut false, |_, current_depth| { </ins> counter += 1; fcx.tcx.mk_region(ty::ReLateBound(current_depth, ty::BrAnon(counter))) }); <ins> // Store the generator types and spans into the tables for this generator. let interior_types = types.iter().map(|t| t.0.clone()).collect::<Vec<_>>(); visitor.fcx.inh.tables.borrow_mut().generator_interior_types = interior_types; // Extract type components let type_list = fcx.tcx.mk_type_list(types.into_iter().map(|t| (t.0).ty)); </ins> let witness = fcx.tcx.mk_generator_witness(ty::Binder::bind(type_list)); debug!("types in generator after region replacement {:?}, span = {:?}",

<ins> // check-pass // compile-flags: -Z query-dep-graph // edition:2018 // Regression test for ICE related to `await`ing in a method + incr. comp. (#64964) struct Body; impl Body { async fn next(&mut self) { async {}.await } } // Another reproduction: `await`ing with a variable from for-loop. async fn bar() { for x in 0..10 { async { Some(x) }.await.unwrap(); } } fn main() {} </ins>