The default way impl Trait works in return position is changing in Rust 2024. These changes are meant to simplify impl Trait to better match what people want most of the time. We're also adding a flexible syntax that gives you full control when you need it. TL;DR Starting in Rust 2024, we are changing the rules for when a generic parameter can be used in the hidden type of a return-position impl T