about summary refs log tree commit diff
path: root/tests/ui
diff options
context:
space:
mode:
authorMichael Goulet <michael@errs.io>2023-06-08 04:19:27 +0000
committerMichael Goulet <michael@errs.io>2023-06-08 04:22:47 +0000
commit54fb5a48b968b3a329ceeb57226d9ac60f983f04 (patch)
treede5e0551cff54ac9d7032f91e441532f7b03544e /tests/ui
parentf383703e32dc583468a702213eff63c58c7f9ef5 (diff)
downloadrust-54fb5a48b968b3a329ceeb57226d9ac60f983f04.tar.gz
rust-54fb5a48b968b3a329ceeb57226d9ac60f983f04.zip
Structurally resolve correctly in check_pat_lit
Diffstat (limited to 'tests/ui')
-rw-r--r--tests/ui/traits/new-solver/slice-match-byte-lit.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/ui/traits/new-solver/slice-match-byte-lit.rs b/tests/ui/traits/new-solver/slice-match-byte-lit.rs
new file mode 100644
index 00000000000..4f848062595
--- /dev/null
+++ b/tests/ui/traits/new-solver/slice-match-byte-lit.rs
@@ -0,0 +1,11 @@
+// compile-flags: -Ztrait-solver=next
+// check-pass
+
+fn test(s: &[u8]) {
+    match &s[0..3] {
+        b"uwu" => {}
+        _ => {}
+    }
+}
+
+fn main() {}