Weird HRTB behavior with associated types #99548
Labels
A-associated-items
Area: Associated items (types, constants & functions)
A-higher-ranked
Area: Higher-ranked things (e.g., lifetimes, types, trait bounds aka HRTBs)
A-lifetimes
Area: Lifetimes / regions
T-types
Relevant to the types team, which will review and decide on the PR/issue.
I've trying compile this code.
Everyone knows the lifetime of the
Foo(())
is general enough but it emits error.If we remove
Output = B
and its generic typeB
it works fine.or in other way, moving references associate type to method signature. it also works.
I guess at least this code should have same lifetime behavior as first one.
Am I doing wrong with something or this is something the bug related to #70263?
The text was updated successfully, but these errors were encountered: