diff options
| author | bors <bors@rust-lang.org> | 2020-06-08 13:49:29 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2020-06-08 13:49:29 +0000 |
| commit | 08b84b3f76db772f4aee5385bf79545417763acf (patch) | |
| tree | 86214f7bd6e8b6019dd46de753a2ce2ac040dfe8 /src/libstd/sys/unix/net.rs | |
| parent | 67ec96c8f97ae810f72ccc08c8bf0c371ff11305 (diff) | |
| parent | a9ca832b11f7671f5d88f299a44415cf964304e7 (diff) | |
| download | rust-08b84b3f76db772f4aee5385bf79545417763acf.tar.gz rust-08b84b3f76db772f4aee5385bf79545417763acf.zip | |
Auto merge of #5378 - Centril:unnested-or-pats, r=flip1995,phansch
New lint: `unnested_or_patterns` changelog: Adds a lint `unnested_or_patterns`, suggesting `Some(0 | 2)` as opposed to `Some(0) | Some(2)`. The lint only fires on compilers capable of using `#![feature(or_patterns)]`. - The lint is primarily encoded as a pure algorithm which to unnest or-patterns in an `ast::Pat` (`fn unnest_or_patterns`) through a `MutVisitor`. After that is done, and assuming that any change was detected, then `pprust::pat_to_string` is used to simply convert the transformed pattern into a suggestion. - The PR introduces a module `utils::ast_utils` with a bunch of functions for spanless & nodeless equality comparisons of ASTs. cc https://github.com/rust-lang/rust/issues/54883
Diffstat (limited to 'src/libstd/sys/unix/net.rs')
0 files changed, 0 insertions, 0 deletions
