about summary refs log tree commit diff
path: root/tests/rustdoc-js-std/full-path-function.js
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-11-25 11:35:46 +0000
committerbors <bors@rust-lang.org>2023-11-25 11:35:46 +0000
commit3664d6328d12cdb1dc6dd4b226d2c635b7400bcc (patch)
tree92573a2e398c5080d9fa5648315e44f08b8ba6aa /tests/rustdoc-js-std/full-path-function.js
parentfbf13cea16b98fd65487559fb2b82c6cf1207c73 (diff)
parentef38969e06127a664ea532e0fd154638b3431ccb (diff)
downloadrust-3664d6328d12cdb1dc6dd4b226d2c635b7400bcc.tar.gz
rust-3664d6328d12cdb1dc6dd4b226d2c635b7400bcc.zip
Auto merge of #11864 - GuillaumeGomez:option_map_or_err_ok, r=flip1995
Create new lint `option_map_or_err_ok`

Fixes #10045.

For the following code:

```rust
let opt = Some(1);
opt.map_or(Err("error"), Ok);
```

It suggests to instead write:

```rust
let opt = Some(1);
opt.ok_or("error");
```

r? `@flip1995`

changelog: Create new lint `option_map_or_err_ok`
Diffstat (limited to 'tests/rustdoc-js-std/full-path-function.js')
0 files changed, 0 insertions, 0 deletions