Oddity with lifetime elision and type aliases #140611
Labels
A-lifetimes
Area: Lifetimes / regions
C-bug
Category: This is a bug.
I-compiler-nominated
Nominated for discussion during a compiler team meeting.
I-lang-radar
Items that are on lang's radar and will need eventual work or consideration.
needs-crater
This change needs a crater run to check for possible breakage in the ecosystem.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
T-lang
Relevant to the language team, which will review and decide on the PR/issue.
In reviewing a test case for,
mismatched-lifetime-syntaxes
lint #138677I was led to the following oddity:
Playground link
This was noticed long ago in #60944 (comment), which is presumably when the test case was added, but I can't immediately find later discussion.
The Reference doesn't document this behavior.
(The FLS, as best I can tell on a skim, does not document lifetime elision at all.)If there's a good reason for this as the correct behavior, we should probably write this down in the Reference. Otherwise, I'm going to propose we agree to try to do away with this somehow, if possible, maybe over an edition.
@rustbot labels +C-discussion +T-lang +I-lang-nominated +A-lifetimes
cc @rust-lang/lang @ehuss
The text was updated successfully, but these errors were encountered: