I’m a Rust, newb so don’t take this the wrong way. I want to learn what prevents following code:
fn max_by<B: Ord, F>(self, mut f: F) -> Option<Self::Item>
where
Self: Sized,
F: FnMut(&Self::Item) -> B,
From being slightly more like this:
fn max (self, mut f: FnMut(&Self::Item) -> Ord) -> Option<Self::Item>
I assume it’s something about monomorphization, although is it impossible to somehow determine which parts will be variable during it?