Twitter Feed: Post

Twitter Feed

@rustlang ("Rust Language") retweeted:

@jarrednicholls ("Jarred Nicholls") wrote:

@rustlang I wrote the following playground to explain `impl Trait` to a colleague. He asked why can’t the compiler infer the return type in the commented-out code from the implementation using a type param. What’s a good explanation? Thanks. https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=4a57e6786d1272647c8d303d158df63a