Description
#124918 made note_and_explain_region
abort if ReVar
occurred. Fuzzing found a test case that triggers the abort in #124973, having to do with the c_variadic
feature:
async fn multiple_named_lifetimes(_: u8, ...) {}
ReVar
was re-allowed in #125054.
@compiler-errors had the following analysis:
So the tl;dr is:
rust/compiler/rustc_borrowck/src/universal_regions.rs
Lines 517 to 520 in 9105c57
We create an anonymous free region here for the
VaListImpl<'_>
that c-variadic is implicitly lowered to.Async functions capture that var arg list (not exactly certain how they end up doing that, though), and so the lifetime ends up being captured by the async fn's future. That ends up erroring because the future ends up capturing a lifetime that it didn't expect, which should probably not happen, but regardless is a problem because we have no way of providing a useful error message even if we don't expect it to work... the diagnostic isn't useful at all.