Hacker News new | ask | show | jobs
by steveklabnik 2965 days ago
The mismatch isn’t about the associated type, it’s about the actual, underlying type. One is a Map and one is a Filter. It’s not possible to determine which is returned, so you inherently need dynamic dispatch.

There is some discussion about it possibly being sugar for an anonymous enum in the future, but that’s not what it is right now.

1 comments

Is there an RFC for the anonymous enum thing? I would gladly write the implementation ... :D
I don’t believe so? I feel like there’s several internals discussions but no RFC yet.
there's some discussion, but no RFC yet. https://github.com/rust-lang/rfcs/issues/2414