impl trait: code that doesn't constrain a RPIT infers ()
?
#96460
Labels
A-impl-trait
Area: `impl Trait`. Universally / existentially quantified anonymous types with static dispatch.
A-inference
Area: Type inference
P-high
High priority
The above code [playground] fails on stable with the following error, but compiles on nightlies after #94081 . It seems to me it shouldn't, the type is not constrained at all.
It seems to be inferring the opaque type to be
()
. For example, if you change it toimpl Future
:The text was updated successfully, but these errors were encountered: