diff options
| author | surechen <chenshuo17@huawei.com> | 2024-07-23 10:24:45 +0800 |
|---|---|---|
| committer | surechen <chenshuo17@huawei.com> | 2024-07-23 10:24:45 +0800 |
| commit | b4b991e66f0a1fd0e517ed7f038129350a7ad6ce (patch) | |
| tree | ab3d9efc34ac6c71e2e50580e6c347a82631e6c1 /tests/rustdoc-js-std/parser-errors.js | |
| parent | cefe1dcef0e21f4d0c8ea856ad61c1936dfb7913 (diff) | |
| download | rust-b4b991e66f0a1fd0e517ed7f038129350a7ad6ce.tar.gz rust-b4b991e66f0a1fd0e517ed7f038129350a7ad6ce.zip | |
Suggest adding Result return type for associated method in E0277.
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
Diffstat (limited to 'tests/rustdoc-js-std/parser-errors.js')
0 files changed, 0 insertions, 0 deletions
