We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e7c528d commit d873c61Copy full SHA for d873c61
tests/ui/stacked_if_match.rs
@@ -77,6 +77,31 @@ fn match_no_lint() {
77
}
78
79
80
+fn if_match_no_lint() {
81
+ let x = 0;
82
+ if match x {
83
+ 1 => 2,
84
+ _ => 3,
85
+ } == 4 {
86
+ println!("true");
87
+ }
88
+}
89
+
90
+fn match_if_no_lint() {
91
92
+ match if x == 1 {
93
+ let y = 2;
94
+ y + 1
95
+ } else {
96
+ let z = 3;
97
+ z + 1
98
+ } {
99
+ 1 => {},
100
+ 2 => {},
101
+ _ => {},
102
103
104
105
macro_rules! if_macro {
106
($var:ident) => {
107
if $var == 1 { true } else { false }
0 commit comments