Cannot infer lifetime with disjoint capture. #88431
Labels
A-closures
Area: Closures (`|…| { … }`)
A-edition-2021
Area: The 2021 edition
C-bug
Category: This is a bug.
I tried this code:
This compiles successfully without disjoint captures, but with them enable gives a lifetime error:
I would expect either it to compile successfully, or the
rust_2021_incompatible_closure_captures
lint to provide a suggestion to make it compile successfully.Found in the 2021 crater run for https://crater-reports.s3.amazonaws.com/pr-87190-3/try%23a7a572ce3edd6d476191fbfe92c9c1986e009b34/gh/stefan-blair.tetrust/log.txt
(Sorry, didn't narrow the example down further, or if this is a duplicate.)
Meta
rustc --version --verbose
:cc @rust-lang/wg-rfc-2229
The text was updated successfully, but these errors were encountered: