summaryrefslogtreecommitdiffstats
path: root/src/test/ui/deref-patterns/default-infer.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/deref-patterns/default-infer.rs')
-rw-r--r--src/test/ui/deref-patterns/default-infer.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/test/ui/deref-patterns/default-infer.rs b/src/test/ui/deref-patterns/default-infer.rs
new file mode 100644
index 000000000..050b84730
--- /dev/null
+++ b/src/test/ui/deref-patterns/default-infer.rs
@@ -0,0 +1,9 @@
+// check-pass
+#![feature(string_deref_patterns)]
+
+fn main() {
+ match <_ as Default>::default() {
+ "" => (),
+ _ => unreachable!(),
+ }
+}