summaryrefslogtreecommitdiffstats
path: root/src/test/ui/suggestions/const-in-struct-pat.rs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/test/ui/suggestions/const-in-struct-pat.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/test/ui/suggestions/const-in-struct-pat.rs b/src/test/ui/suggestions/const-in-struct-pat.rs
new file mode 100644
index 000000000..1cbba9354
--- /dev/null
+++ b/src/test/ui/suggestions/const-in-struct-pat.rs
@@ -0,0 +1,11 @@
+#[allow(non_camel_case_types)]
+struct foo;
+struct Thing {
+ foo: String,
+}
+
+fn example(t: Thing) {
+ let Thing { foo } = t; //~ ERROR mismatched types
+}
+
+fn main() {}