about summary refs log tree commit diff
path: root/tests/ui/pattern/byte-string-inference.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/pattern/byte-string-inference.rs')
-rw-r--r--tests/ui/pattern/byte-string-inference.rs15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/ui/pattern/byte-string-inference.rs b/tests/ui/pattern/byte-string-inference.rs
new file mode 100644
index 00000000000..b1517de6b67
--- /dev/null
+++ b/tests/ui/pattern/byte-string-inference.rs
@@ -0,0 +1,15 @@
+// check-pass
+
+fn load<L>() -> Option<L> {
+    todo!()
+}
+
+fn main() {
+    while let Some(tag) = load() {
+        match &tag {
+            b"NAME" => {}
+            b"DATA" => {}
+            _ => {}
+        }
+    }
+}