Lifetime error doesn't point to causing line #138900
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Code
Current output
Desired output
It should point to struct B since it is causing the lifetime of a ('1) to outlive 'static.
Rationale and extra context
Currently the compiler doesn't guide me to the line of causing the 'static requirement.
Other cases
Rust Version
> rustc --version --verbose rustc 1.85.0 (4d91de4e4 2025-02-17) binary: rustc commit-hash: 4d91de4e48198da2e33413efdcd9cd2cc0c46688 commit-date: 2025-02-17 host: x86_64-unknown-linux-gnu release: 1.85.0 LLVM version: 19.1.7
Anything else?
Maybe related to #69224
The text was updated successfully, but these errors were encountered: