rust/tests
bors 42796e11c5 Auto merge of #5401 - dtolnay:option, r=Manishearth
Downgrade option_option to pedantic

Based on a search of my work codebase (\>500k lines) for `Option<Option<`, it looks like a bunch of reasonable uses to me. The documented motivation for this lint is:

> an optional optional value is logically the same thing as an optional value but has an unneeded extra level of wrapping

which seems a bit bogus in practice. For example a typical usage would look like:

```rust
let mut host: Option<String> = None;
let mut port: Option<i32> = None;
let mut payload: Option<Option<String>> = None;

for each field {
    match field.name {
        "host" => host = Some(...),
        "port" => port = Some(...),
        "payload" => payload = Some(...), // can be null or string
        _ => return error,
    }
}

let host = host.ok_or(...)?;
let port = port.ok_or(...)?;
let payload = payload.ok_or(...)?;
do_thing(host, port, payload)
```

This lint seems to fit right in with the pedantic group; I don't think linting on occurrences of `Option<Option<T>>` by default is justified.

---

changelog: Remove option_option from default set of enabled lints
2020-04-01 21:30:24 +00:00
..
auxiliary
cargo
ui Auto merge of #5401 - dtolnay:option, r=Manishearth 2020-04-01 21:30:24 +00:00
ui-toml
compile-test.rs
dogfood.rs
fmt.rs
integration.rs Don't convert Path to lossy str 2020-03-14 22:20:16 +07:00
matches.rs
missing-test-files.rs
versioncheck.rs