about summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp
diff options
context:
space:
mode:
authorTrevor Gross <t.gross35@gmail.com>2024-08-18 23:41:46 -0500
committerGitHub <noreply@github.com>2024-08-18 23:41:46 -0500
commitd21b6f2715c40ed927f7e8a5e1ae4cc6ba56f0d2 (patch)
treeb2132a06aa2f17c9c41e915120cbe3ee022fb54b /compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp
parentf27a9b15d311e12319977bf9867042b677220c72 (diff)
parentb4b991e66f0a1fd0e517ed7f038129350a7ad6ce (diff)
downloadrust-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 'compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp')
0 files changed, 0 insertions, 0 deletions