summary refs log tree commit diff
path: root/src/test/ui/error-codes
diff options
context:
space:
mode:
authorMazdak Farrokhzad <twingoow@gmail.com>2019-07-30 01:25:30 +0200
committerMazdak Farrokhzad <twingoow@gmail.com>2019-09-08 01:39:24 +0200
commit642993e6dca427ce3cc5ca97bccaf6f6c872eb16 (patch)
tree4f31c5dead1e5b6f5eae380f98bde430a8530f0c /src/test/ui/error-codes
parent0356813b27262bf9ceec5f0fa48302262d501cd4 (diff)
downloadrust-642993e6dca427ce3cc5ca97bccaf6f6c872eb16.tar.gz
rust-642993e6dca427ce3cc5ca97bccaf6f6c872eb16.zip
Update tests wrt. bind_by_by_move_pattern_guards stabilization.
Diffstat (limited to 'src/test/ui/error-codes')
-rw-r--r--src/test/ui/error-codes/E0008.rs7
-rw-r--r--src/test/ui/error-codes/E0008.stderr11
-rw-r--r--src/test/ui/error-codes/E0301.rs2
-rw-r--r--src/test/ui/error-codes/E0301.stderr13
-rw-r--r--src/test/ui/error-codes/E0302.rs2
-rw-r--r--src/test/ui/error-codes/E0302.stderr9
6 files changed, 5 insertions, 39 deletions
diff --git a/src/test/ui/error-codes/E0008.rs b/src/test/ui/error-codes/E0008.rs
deleted file mode 100644
index c87ef4cb854..00000000000
--- a/src/test/ui/error-codes/E0008.rs
+++ /dev/null
@@ -1,7 +0,0 @@
-fn main() {
-    match Some("hi".to_string()) {
-        Some(s) if s.len() == 0 => {},
-        //~^ ERROR E0008
-        _ => {},
-    }
-}
diff --git a/src/test/ui/error-codes/E0008.stderr b/src/test/ui/error-codes/E0008.stderr
deleted file mode 100644
index 6b45439c4b5..00000000000
--- a/src/test/ui/error-codes/E0008.stderr
+++ /dev/null
@@ -1,11 +0,0 @@
-error[E0008]: cannot bind by-move into a pattern guard
-  --> $DIR/E0008.rs:3:14
-   |
-LL |         Some(s) if s.len() == 0 => {},
-   |              ^ moves value into pattern guard
-   |
-   = help: add `#![feature(bind_by_move_pattern_guards)]` to the crate attributes to enable
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0008`.
diff --git a/src/test/ui/error-codes/E0301.rs b/src/test/ui/error-codes/E0301.rs
index 3b451801c99..0df04036bb7 100644
--- a/src/test/ui/error-codes/E0301.rs
+++ b/src/test/ui/error-codes/E0301.rs
@@ -1,7 +1,7 @@
 fn main() {
     match Some(()) {
         None => { },
-        option if option.take().is_none() => {}, //~ ERROR E0301
+        option if option.take().is_none() => {},
         Some(_) => { } //~^ ERROR E0596
     }
 }
diff --git a/src/test/ui/error-codes/E0301.stderr b/src/test/ui/error-codes/E0301.stderr
index 4f12fd3850e..661b86e3894 100644
--- a/src/test/ui/error-codes/E0301.stderr
+++ b/src/test/ui/error-codes/E0301.stderr
@@ -1,11 +1,3 @@
-error[E0301]: cannot mutably borrow in a pattern guard
-  --> $DIR/E0301.rs:4:19
-   |
-LL |         option if option.take().is_none() => {},
-   |                   ^^^^^^ borrowed mutably in pattern guard
-   |
-   = help: add `#![feature(bind_by_move_pattern_guards)]` to the crate attributes to enable
-
 error[E0596]: cannot borrow `option` as mutable, as it is immutable for the pattern guard
   --> $DIR/E0301.rs:4:19
    |
@@ -14,7 +6,6 @@ LL |         option if option.take().is_none() => {},
    |
    = note: variables bound in patterns are immutable until the end of the pattern guard
 
-error: aborting due to 2 previous errors
+error: aborting due to previous error
 
-Some errors have detailed explanations: E0301, E0596.
-For more information about an error, try `rustc --explain E0301`.
+For more information about this error, try `rustc --explain E0596`.
diff --git a/src/test/ui/error-codes/E0302.rs b/src/test/ui/error-codes/E0302.rs
index 69f5953deb2..28a1bc31bea 100644
--- a/src/test/ui/error-codes/E0302.rs
+++ b/src/test/ui/error-codes/E0302.rs
@@ -1,7 +1,7 @@
 fn main() {
     match Some(()) {
         None => { },
-        option if { option = None; false } => { }, //~ ERROR E0302
+        option if { option = None; false } => { },
         //~^ ERROR cannot assign to `option`, as it is immutable for the pattern guard
         Some(_) => { }
     }
diff --git a/src/test/ui/error-codes/E0302.stderr b/src/test/ui/error-codes/E0302.stderr
index a077fcaea41..5854772f1d3 100644
--- a/src/test/ui/error-codes/E0302.stderr
+++ b/src/test/ui/error-codes/E0302.stderr
@@ -1,9 +1,3 @@
-error[E0302]: cannot assign in a pattern guard
-  --> $DIR/E0302.rs:4:21
-   |
-LL |         option if { option = None; false } => { },
-   |                     ^^^^^^^^^^^^^ assignment in pattern guard
-
 error[E0594]: cannot assign to `option`, as it is immutable for the pattern guard
   --> $DIR/E0302.rs:4:21
    |
@@ -12,6 +6,5 @@ LL |         option if { option = None; false } => { },
    |
    = note: variables bound in patterns are immutable until the end of the pattern guard
 
-error: aborting due to 2 previous errors
+error: aborting due to previous error
 
-For more information about this error, try `rustc --explain E0302`.