about summary refs log tree commit diff
path: root/src/test/ui/pattern
diff options
context:
space:
mode:
authorMazdak Farrokhzad <twingoow@gmail.com>2019-12-14 18:20:13 +0100
committerMazdak Farrokhzad <twingoow@gmail.com>2019-12-23 14:47:19 +0100
commit6a87f99620f0883f9cf5924885c6175e578da6d6 (patch)
treecd810ebcb83e3dd2b7d26f33af2d78f815e13070 /src/test/ui/pattern
parent25b6a28a51e1539abd1df3c1ca6371d0873f8d6d (diff)
downloadrust-6a87f99620f0883f9cf5924885c6175e578da6d6.tar.gz
rust-6a87f99620f0883f9cf5924885c6175e578da6d6.zip
check_legality_of_move_bindings: generalize diagnostics & add comments
Diffstat (limited to 'src/test/ui/pattern')
-rw-r--r--src/test/ui/pattern/bindings-after-at/bind-by-move-neither-can-live-while-the-other-survives-1.stderr2
-rw-r--r--src/test/ui/pattern/bindings-after-at/borrowck-pat-at-and-box.stderr2
-rw-r--r--src/test/ui/pattern/bindings-after-at/borrowck-pat-by-move-and-ref.stderr2
-rw-r--r--src/test/ui/pattern/bindings-after-at/borrowck-pat-ref-mut-and-ref.stderr2
-rw-r--r--src/test/ui/pattern/bindings-after-at/default-binding-modes-both-sides-independent.stderr17
5 files changed, 13 insertions, 12 deletions
diff --git a/src/test/ui/pattern/bindings-after-at/bind-by-move-neither-can-live-while-the-other-survives-1.stderr b/src/test/ui/pattern/bindings-after-at/bind-by-move-neither-can-live-while-the-other-survives-1.stderr
index c4afdc576a1..63866238f56 100644
--- a/src/test/ui/pattern/bindings-after-at/bind-by-move-neither-can-live-while-the-other-survives-1.stderr
+++ b/src/test/ui/pattern/bindings-after-at/bind-by-move-neither-can-live-while-the-other-survives-1.stderr
@@ -13,7 +13,7 @@ LL |         Some(ref _y @ _z) => { },
    |              ---------^^
    |              |        |
    |              |        by-move pattern here
-   |              both by-ref and by-move used
+   |              by-ref pattern here
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/pattern/bindings-after-at/borrowck-pat-at-and-box.stderr b/src/test/ui/pattern/bindings-after-at/borrowck-pat-at-and-box.stderr
index fbf9dfff7fe..af0bcb69bbb 100644
--- a/src/test/ui/pattern/bindings-after-at/borrowck-pat-at-and-box.stderr
+++ b/src/test/ui/pattern/bindings-after-at/borrowck-pat-at-and-box.stderr
@@ -25,7 +25,7 @@ LL |     let ref a @ box b = Box::new(NC);
    |         ------------^
    |         |           |
    |         |           by-move pattern here
-   |         both by-ref and by-move used
+   |         by-ref pattern here
 
 error[E0382]: use of moved value
   --> $DIR/borrowck-pat-at-and-box.rs:11:18
diff --git a/src/test/ui/pattern/bindings-after-at/borrowck-pat-by-move-and-ref.stderr b/src/test/ui/pattern/bindings-after-at/borrowck-pat-by-move-and-ref.stderr
index 9c8a4e25fb8..36dc1b28792 100644
--- a/src/test/ui/pattern/bindings-after-at/borrowck-pat-by-move-and-ref.stderr
+++ b/src/test/ui/pattern/bindings-after-at/borrowck-pat-by-move-and-ref.stderr
@@ -13,7 +13,7 @@ LL |         ref op_string_ref @ Some(s) => {},
    |         -------------------------^-
    |         |                        |
    |         |                        by-move pattern here
-   |         both by-ref and by-move used
+   |         by-ref pattern here
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/pattern/bindings-after-at/borrowck-pat-ref-mut-and-ref.stderr b/src/test/ui/pattern/bindings-after-at/borrowck-pat-ref-mut-and-ref.stderr
index ce79b562ec9..27b94e055a0 100644
--- a/src/test/ui/pattern/bindings-after-at/borrowck-pat-ref-mut-and-ref.stderr
+++ b/src/test/ui/pattern/bindings-after-at/borrowck-pat-ref-mut-and-ref.stderr
@@ -124,5 +124,5 @@ LL |     drop(a);
 
 error: aborting due to 11 previous errors
 
-Some errors have detailed explanations: E0502, E0507.
+Some errors have detailed explanations: E0502, E0507, E0594.
 For more information about an error, try `rustc --explain E0502`.
diff --git a/src/test/ui/pattern/bindings-after-at/default-binding-modes-both-sides-independent.stderr b/src/test/ui/pattern/bindings-after-at/default-binding-modes-both-sides-independent.stderr
index bb0d893887e..3cd756d11ce 100644
--- a/src/test/ui/pattern/bindings-after-at/default-binding-modes-both-sides-independent.stderr
+++ b/src/test/ui/pattern/bindings-after-at/default-binding-modes-both-sides-independent.stderr
@@ -13,7 +13,7 @@ LL |     let ref a @ b = NotCopy;
    |         --------^
    |         |       |
    |         |       by-move pattern here
-   |         both by-ref and by-move used
+   |         by-ref pattern here
 
 error[E0009]: cannot bind by-move and by-ref in the same pattern
   --> $DIR/default-binding-modes-both-sides-independent.rs:22:21
@@ -22,17 +22,18 @@ LL |     let ref mut a @ b = NotCopy;
    |         ------------^
    |         |           |
    |         |           by-move pattern here
-   |         both by-ref and by-move used
+   |         by-ref pattern here
 
 error[E0009]: cannot bind by-move and by-ref in the same pattern
   --> $DIR/default-binding-modes-both-sides-independent.rs:24:20
    |
 LL |         Ok(ref a @ b) | Err(ref a @ b) => {}
-   |                    ^        --------^
-   |                    |        |       |
-   |                    |        |       by-move pattern here
-   |                    |        both by-ref and by-move used
-   |                    by-move pattern here
+   |            --------^        --------^
+   |            |       |        |       |
+   |            |       |        |       by-move pattern here
+   |            |       |        by-ref pattern here
+   |            |       by-move pattern here
+   |            by-ref pattern here
 
 error[E0009]: cannot bind by-move and by-ref in the same pattern
   --> $DIR/default-binding-modes-both-sides-independent.rs:28:17
@@ -41,7 +42,7 @@ LL |         ref a @ b => {}
    |         --------^
    |         |       |
    |         |       by-move pattern here
-   |         both by-ref and by-move used
+   |         by-ref pattern here
 
 error: aborting due to 4 previous errors