Multiple anonymous lifetimes bounds upset compiler #60199
Labels
A-edition-2018-lints
Area: Lints supporting the 2018 edition
A-lifetimes
Area: Lifetimes / regions
A-suggestion-diagnostics
Area: Suggestions generated by the compiler applied by `cargo fix`
C-bug
Category: This is a bug.
L-elided_lifetimes_in_paths
Lint: elided_lifetimes_in_paths
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
TL;DR Rust is unable to compile its own hint with anonymous lifetimes
(Playground)
Rust doesn't like it as
App
is defined with two lifetimes -App<'a, 'b>
and indeed the hint is dead on:
So we do as suggested and add two anonymous lifetimes to
App<'_, '_>
This time it is even worth as now compiler coudn't tell these two lifetimes apart
So it is either anonymous liftime logic should be fixed to work similar to the type hints, or the help message should avoid suggesting incorrect syntax.
The text was updated successfully, but these errors were encountered: