about summary refs log tree commit diff
path: root/tests/ui/async-await/async-closures/without-precise-captures-we-are-powerless.rs
AgeCommit message (Collapse)AuthorLines
2025-09-28Point at fn bound that introduced lifetime obligationEsteban Küber-0/+14
``` error[E0597]: `c` does not live long enough --> $DIR/without-precise-captures-we-are-powerless.rs:19:20 | LL | fn simple<'a>(x: &'a i32) { | -- lifetime `'a` defined here ... LL | let c = async move || { println!("{}", *x); }; | - binding `c` declared here LL | outlives::<'a>(c()); | ---------------^--- | | | | | borrowed value does not live long enough | argument requires that `c` is borrowed for `'a` LL | outlives::<'a>(call_once(c)); LL | } | - `c` dropped here while still borrowed | note: requirement that `c` is borrowed for `'a` introduced here --> $DIR/without-precise-captures-we-are-powerless.rs:7:33 | LL | fn outlives<'a>(_: impl Sized + 'a) {} | ^^ ``` When encountering a `ConstraintCategory::Predicate` in a funtion call, point at the `Span` for that `Predicate` to explain where the lifetime obligation originates from.
2024-12-13Stabilize async closuresMichael Goulet-2/+0
2024-12-02Move tests back to using AsyncFnMichael Goulet-1/+1
2024-11-02Remove or fix some FIXME(async_closure)Michael Goulet-1/+3
2024-07-26Make coroutine-closures possible to be clonedMichael Goulet-1/+1
2024-04-10Make the computation of coroutine_captures_by_ref_ty more sophisticatedMichael Goulet-0/+47