rust/compiler/rustc_lint
LingMan e2b22b56b8 Use pattern matching instead of checking lengths explicitly
This piece of code checks that there are exaclty two variants, one having
exactly one field, the other having exactly zero fields. If any of these
conditions is violated, it returns `None`. Otherwise it assigns that one
field's ty to `field_ty`.

Instead of fiddling with indices and length checks explicitly, use pattern
matching to simplify this.
2021-06-01 22:31:46 +02:00
..
src Use pattern matching instead of checking lengths explicitly 2021-06-01 22:31:46 +02:00
Cargo.toml Add --extern-loc to augment unused crate dependency diagnostics 2021-02-07 14:54:20 -08:00