about summary refs log tree commit diff
path: root/src/test/ui/pattern
diff options
context:
space:
mode:
authorVishnunarayan K I <appukuttancr@gmail.com>2020-11-03 17:14:51 +0530
committerVishnunarayan K I <appukuttancr@gmail.com>2020-11-03 17:14:51 +0530
commit5827fbadf6feaa3da42d7223ac9f10148c827a89 (patch)
tree73ca0f4a6e214a8293fdbbedc4a6ba48b64a327c /src/test/ui/pattern
parentf44f96d61c11e439e9d4092258e3322e126418bf (diff)
downloadrust-5827fbadf6feaa3da42d7223ac9f10148c827a89.tar.gz
rust-5827fbadf6feaa3da42d7223ac9f10148c827a89.zip
review comments
Diffstat (limited to 'src/test/ui/pattern')
-rw-r--r--src/test/ui/pattern/bindings-after-at/copy-and-move-mixed.rs3
-rw-r--r--src/test/ui/pattern/bindings-after-at/copy-and-move-mixed.stderr2
2 files changed, 4 insertions, 1 deletions
diff --git a/src/test/ui/pattern/bindings-after-at/copy-and-move-mixed.rs b/src/test/ui/pattern/bindings-after-at/copy-and-move-mixed.rs
index 1dc9716f54b..f731aa2e963 100644
--- a/src/test/ui/pattern/bindings-after-at/copy-and-move-mixed.rs
+++ b/src/test/ui/pattern/bindings-after-at/copy-and-move-mixed.rs
@@ -8,6 +8,9 @@ struct C;
 struct NC<A, B>(A, B);
 
 fn main() {
+    // this compiles
+    let a @ NC(b, c) = NC(C, C);
+
     let a @ NC(b, c @ NC(d, e)) = NC(C, NC(C, C));
     //~^ ERROR use of partially moved value
 }
diff --git a/src/test/ui/pattern/bindings-after-at/copy-and-move-mixed.stderr b/src/test/ui/pattern/bindings-after-at/copy-and-move-mixed.stderr
index 9ffbadf36a6..183a37176ec 100644
--- a/src/test/ui/pattern/bindings-after-at/copy-and-move-mixed.stderr
+++ b/src/test/ui/pattern/bindings-after-at/copy-and-move-mixed.stderr
@@ -1,5 +1,5 @@
 error[E0382]: use of partially moved value
-  --> $DIR/copy-and-move-mixed.rs:11:9
+  --> $DIR/copy-and-move-mixed.rs:14:9
    |
 LL |     let a @ NC(b, c @ NC(d, e)) = NC(C, NC(C, C));
    |         ^^^^^^^^^^------------^