summaryrefslogtreecommitdiffstats
path: root/tests/ui/parser/struct-literal-in-if.rs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--tests/ui/parser/struct-literal-in-if.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/ui/parser/struct-literal-in-if.rs b/tests/ui/parser/struct-literal-in-if.rs
index 2ce2c8f18..c4a253c3d 100644
--- a/tests/ui/parser/struct-literal-in-if.rs
+++ b/tests/ui/parser/struct-literal-in-if.rs
@@ -14,4 +14,9 @@ fn main() {
}.hi() {
println!("yo");
}
+ if let true = Foo { //~ ERROR struct literals are not allowed here
+ x: 3
+ }.hi() {
+ println!("yo");
+ }
}