We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 13f5a92 commit 786b30dCopy full SHA for 786b30d
1 file changed
crates/ide-assists/src/handlers/move_guard.rs
@@ -439,6 +439,32 @@ fn main() {
439
move_guard_to_arm_body,
440
r#"
441
fn main() {
442
+ match 92 {
443
+ x @ 0..30 if x % 3 == 0 => false,
444
+ x @ 0..30 $0if x % 2 == 0$0 => true,
445
+ x @ 0..30 => false,
446
+ _ => true
447
+ }
448
+}
449
+"#,
450
+ r#"
451
+fn main() {
452
453
454
+ x @ 0..30 => if x % 2 == 0 {
455
+ true
456
+ },
457
458
459
460
461
462
+ );
463
+
464
+ check_assist(
465
+ move_guard_to_arm_body,
466
467
468
match 92 {
469
x @ 0..30 $0if x % 3 == 0 => false,
470
x @ 0..30 $0if x % 2 == 0 => true,
0 commit comments