5 ms·
Keyword Generics Progress February 2023
- satvikpendem 4y agoOn the /r/rust post, another user mentioned that having the effects be in the where clause (or in a separate effect clause) would likely look and feel much more like Rust: fn foo_finder<It, Cl, I>(iter: It, closure: It) -> Option<I> where It: Iterator<Item = I>, Cl: FnMut(&I) -> bool, fn: async if It: async + Cl: async, fn: const if Cl: const, fn: !panics if It: !panics + F2: !panics { /* ... */ } or fn foo<F, T>(closure: F) -> Option<T> where F: FnMut(&T) -> bool, effect const if F: const, ?async, { /* ... */ } I agree that the current ?const ?async syntax feels very messy.