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 c862346 commit 2de6eb7Copy full SHA for 2de6eb7
crates/hir_ty/src/tests/patterns.rs
@@ -654,3 +654,28 @@ fn slice_tail_pattern() {
654
"#]],
655
);
656
}
657
+
658
+#[test]
659
+fn box_pattern() {
660
+ check_infer(
661
+ r#"
662
+ #[lang = "owned_box"]
663
+ pub struct Box<T>(T);
664
665
+ fn foo(params: Box<i32>) {
666
+ match params {
667
+ box integer => {}
668
+ }
669
670
+ "#,
671
+ expect![[r#"
672
+ 52..58 'params': Box<i32>
673
+ 70..124 '{ ... } }': ()
674
+ 76..122 'match ... }': ()
675
+ 82..88 'params': Box<i32>
676
+ 99..110 'box integer': Box<i32>
677
+ 103..110 'integer': i32
678
+ 114..116 '{}': ()
679
+ "#]],
680
+ );
681
+}
0 commit comments