mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-25 08:13:41 +00:00
b4b991e66f
For following: ```rust struct A; impl A { fn test4(&self) { let mut _file = File::create("foo.txt")?; //~^ ERROR the `?` operator can only be used in a method } ``` Suggest: ```rust impl A { fn test4(&self) -> Result<(), Box<dyn std::error::Error>> { let mut _file = File::create("foo.txt")?; //~^ ERROR the `?` operator can only be used in a method Ok(()) } } ``` For #125997 |
||
---|---|---|
.. | ||
src | ||
Cargo.toml | ||
messages.ftl |