Why does calling a method on a variable prevent Rust from inferring the type of the variable?

前端 未结 0 1286
一生所求
一生所求 2021-02-11 17:11

This code compiles:

#[derive(Debug, Default)]
struct Example;

impl Example {
    fn some_method(&self) {}
}

fn reproduction() -> Example {
    let examp         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题