diff options
| author | Jubilee <46493976+workingjubilee@users.noreply.github.com> | 2024-06-12 03:57:20 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-06-12 03:57:20 -0700 |
| commit | 519a32239272508d95ea509b128dc72f2cf2bde2 (patch) | |
| tree | e2ac8d85ec40f7e22f261a89d5804764e2536149 /tests/ui/patchable-function-entry/patchable-function-entry-attribute.rs | |
| parent | 322af5c274301353b66b1bbb6f6d14232bf71438 (diff) | |
| parent | 0b3fec9388d358b0b48d1ea2f83ff43468402f23 (diff) | |
| download | rust-519a32239272508d95ea509b128dc72f2cf2bde2.tar.gz rust-519a32239272508d95ea509b128dc72f2cf2bde2.zip | |
Rollup merge of #126187 - surechen:fix_125997, r=oli-obk
For E0277 suggest adding `Result` return type for function when using QuestionMark `?` in the body.
Adding suggestions for following function in E0277.
```rust
fn main() {
let mut _file = File::create("foo.txt")?;
}
```
to
```rust
fn main() -> Result<(), Box<dyn std::error::Error>> {
let mut _file = File::create("foo.txt")?;
return Ok(());
}
```
According to the issue #125997, only the code examples in the issue are targeted, but the issue covers a wider range of situations.
<!--
If this PR is related to an unstable feature or an otherwise tracked effort,
please link to the relevant tracking issue here. If you don't know of a related
tracking issue or there are none, feel free to ignore this.
This PR will get automatically assigned to a reviewer. In case you would like
a specific user to review your work, you can assign it to them by using
r? <reviewer name>
-->
Diffstat (limited to 'tests/ui/patchable-function-entry/patchable-function-entry-attribute.rs')
0 files changed, 0 insertions, 0 deletions
