summaryrefslogtreecommitdiffstats
path: root/tests/ui/pattern/pattern-bad-ref-box-order.fixed
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/pattern/pattern-bad-ref-box-order.fixed')
-rw-r--r--tests/ui/pattern/pattern-bad-ref-box-order.fixed14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/ui/pattern/pattern-bad-ref-box-order.fixed b/tests/ui/pattern/pattern-bad-ref-box-order.fixed
new file mode 100644
index 000000000..8825744a0
--- /dev/null
+++ b/tests/ui/pattern/pattern-bad-ref-box-order.fixed
@@ -0,0 +1,14 @@
+// run-rustfix
+
+#![feature(box_patterns)]
+#![allow(dead_code)]
+
+fn foo(f: Option<Box<i32>>) {
+ match f {
+ Some(box ref _i) => {},
+ //~^ ERROR switch the order of `ref` and `box`
+ None => {}
+ }
+}
+
+fn main() { }