File tree Expand file tree Collapse file tree 1 file changed +49
-0
lines changed Expand file tree Collapse file tree 1 file changed +49
-0
lines changed Original file line number Diff line number Diff line change @@ -2080,6 +2080,55 @@ println!("os is not pi!");
20802080println! (" os is not pi!" );
20812081```
20822082
2083+ ## ` strip_leading_match_arm_pipes `
2084+
2085+ Controls whether to remove leading pipes from match arms
2086+
2087+ - ** Default value** : ` true `
2088+ - ** Possible values** : ` true ` , ` false `
2089+ - ** Stable** : Yes
2090+
2091+ #### ` true ` :
2092+ ``` rust
2093+ // Leading pipes are from this:
2094+ // fn foo() {
2095+ // match foo {
2096+ // | "foo" | "bar" => {}
2097+ // | "baz"
2098+ // | "something relatively long"
2099+ // | "something really really really realllllllllllllly long" => println!("x"),
2100+ // | "qux" => println!("y"),
2101+ // _ => {}
2102+ // }
2103+ // }
2104+
2105+ // Are removed:
2106+ fn foo () {
2107+ match foo {
2108+ " foo" | " bar" => {}
2109+ " baz"
2110+ | " something relatively long"
2111+ | " something really really really realllllllllllllly long" => println! (" x" ),
2112+ " qux" => println! (" y" ),
2113+ _ => {}
2114+ }
2115+ }
2116+ ```
2117+
2118+ #### ` false ` :
2119+ ``` rust
2120+ fn foo () {
2121+ match foo {
2122+ | " foo" | " bar" => {}
2123+ | " baz"
2124+ | " something relatively long"
2125+ | " something really really really realllllllllllllly long" => println! (" x" ),
2126+ | " qux" => println! (" y" ),
2127+ _ => {}
2128+ }
2129+ }
2130+ ```
2131+
20832132## ` struct_field_align_threshold `
20842133
20852134The maximum diff of width between struct fields to be aligned with each other.
You can’t perform that action at this time.
0 commit comments