aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_ty/src/diagnostics/pattern.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/hir_ty/src/diagnostics/pattern.rs')
-rw-r--r--crates/hir_ty/src/diagnostics/pattern.rs26
1 files changed, 26 insertions, 0 deletions
diff --git a/crates/hir_ty/src/diagnostics/pattern.rs b/crates/hir_ty/src/diagnostics/pattern.rs
index 3e90461cc..044506d66 100644
--- a/crates/hir_ty/src/diagnostics/pattern.rs
+++ b/crates/hir_ty/src/diagnostics/pattern.rs
@@ -121,4 +121,30 @@ fn main(v: E) {
121"#, 121"#,
122 ); 122 );
123 } 123 }
124
125 #[test]
126 fn boolean() {
127 check_diagnostics(
128 r#"
129fn main() {
130 match true {
131 true => {}
132 false => {}
133 }
134 match true {
135 true | false => {}
136 }
137 match true {
138 true => {}
139 _ => {}
140 }
141 match true {}
142 //^^^^ Missing match arm
143 match true { true => {} }
144 //^^^^ Missing match arm
145
146}
147"#,
148 );
149 }
124} 150}