diff options
| author | Trevor Gross <t.gross35@gmail.com> | 2024-08-18 23:41:46 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-08-18 23:41:46 -0500 |
| commit | d21b6f2715c40ed927f7e8a5e1ae4cc6ba56f0d2 (patch) | |
| tree | b2132a06aa2f17c9c41e915120cbe3ee022fb54b /tests/rustdoc-js-std/parser-slice-array.js | |
| parent | f27a9b15d311e12319977bf9867042b677220c72 (diff) | |
| parent | b4b991e66f0a1fd0e517ed7f038129350a7ad6ce (diff) | |
| download | rust-d21b6f2715c40ed927f7e8a5e1ae4cc6ba56f0d2.tar.gz rust-d21b6f2715c40ed927f7e8a5e1ae4cc6ba56f0d2.zip | |
Rollup merge of #128084 - surechen:fix_125997_v1, r=cjgillot
Suggest adding Result return type for associated method in E0277.
Recommit #126515 because I messed up during rebase,
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
r? `@cjgillot`
Diffstat (limited to 'tests/rustdoc-js-std/parser-slice-array.js')
0 files changed, 0 insertions, 0 deletions
