about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2018-06-24 15:08:48 +0000
committerbors <bors@rust-lang.org>2018-06-24 15:08:48 +0000
commit01cc982e936120acb0424e41de14e42ba2d88c6f (patch)
treef81b10468c949fbfd6294ce21baa26b93c1e51f1
parent3874676dc6bcb311fa134baa5232d971d6573b29 (diff)
parent8f1ef6e3bee75dc51102bc11205cb78d08085e87 (diff)
downloadrust-01cc982e936120acb0424e41de14e42ba2d88c6f.tar.gz
rust-01cc982e936120acb0424e41de14e42ba2d88c6f.zip
Auto merge of #51740 - GuillaumeGomez:fix-error-code-numbers, r=cramertj
Fix error code numbers

Fixes issue created by #51580.

r? @cramertj
-rw-r--r--src/librustc/diagnostics.rs8
-rw-r--r--src/librustc/hir/lowering.rs8
-rw-r--r--src/test/ui/async-fn-multiple-lifetimes.stderr6
-rw-r--r--src/test/ui/no-args-non-move-async-closure.stderr4
4 files changed, 13 insertions, 13 deletions
diff --git a/src/librustc/diagnostics.rs b/src/librustc/diagnostics.rs
index 09153c144ae..5fecf2b1535 100644
--- a/src/librustc/diagnostics.rs
+++ b/src/librustc/diagnostics.rs
@@ -2132,9 +2132,9 @@ register_diagnostics! {
     E0687, // in-band lifetimes cannot be used in `fn`/`Fn` syntax
     E0688, // in-band lifetimes cannot be mixed with explicit lifetime binders
 
-    E0906, // closures cannot be static
+    E0697, // closures cannot be static
 
-    E0725, // multiple different lifetimes used in arguments of `async fn`
-    E0726, // multiple elided lifetimes used in arguments of `async fn`
-    E0727, // `async` non-`move` closures with arguments are not currently supported
+    E0707, // multiple elided lifetimes used in arguments of `async fn`
+    E0708, // `async` non-`move` closures with arguments are not currently supported
+    E0709, // multiple different lifetimes used in arguments of `async fn`
 }
diff --git a/src/librustc/hir/lowering.rs b/src/librustc/hir/lowering.rs
index 4f470e1c26b..02046edd218 100644
--- a/src/librustc/hir/lowering.rs
+++ b/src/librustc/hir/lowering.rs
@@ -2043,7 +2043,7 @@ impl<'a> LoweringContext<'a> {
                             struct_span_err!(
                                 self.context.sess,
                                 current_lt_span.between(lifetime.span),
-                                E0725,
+                                E0709,
                                 "multiple different lifetimes used in arguments of `async fn`",
                             )
                                 .span_label(current_lt_span, "first lifetime here")
@@ -2055,7 +2055,7 @@ impl<'a> LoweringContext<'a> {
                             struct_span_err!(
                                 self.context.sess,
                                 current_lt_span.between(lifetime.span),
-                                E0726,
+                                E0707,
                                 "multiple elided lifetimes used in arguments of `async fn`",
                             )
                                 .span_label(current_lt_span, "first lifetime here")
@@ -3549,7 +3549,7 @@ impl<'a> LoweringContext<'a> {
                             struct_span_err!(
                                 this.sess,
                                 fn_decl_span,
-                                E0727,
+                                E0708,
                                 "`async` non-`move` closures with arguments \
                                 are not currently supported",
                             )
@@ -3610,7 +3610,7 @@ impl<'a> LoweringContext<'a> {
                                 span_err!(
                                     this.sess,
                                     fn_decl_span,
-                                    E0906,
+                                    E0697,
                                     "closures cannot be static"
                                 );
                             }
diff --git a/src/test/ui/async-fn-multiple-lifetimes.stderr b/src/test/ui/async-fn-multiple-lifetimes.stderr
index d76bfc5d0e1..f203d9acf87 100644
--- a/src/test/ui/async-fn-multiple-lifetimes.stderr
+++ b/src/test/ui/async-fn-multiple-lifetimes.stderr
@@ -1,4 +1,4 @@
-error[E0725]: multiple different lifetimes used in arguments of `async fn`
+error[E0709]: multiple different lifetimes used in arguments of `async fn`
   --> $DIR/async-fn-multiple-lifetimes.rs:17:49
    |
 LL | async fn multiple_named_lifetimes<'a, 'b>(_: &'a u8, _: &'b u8) {}
@@ -8,7 +8,7 @@ LL | async fn multiple_named_lifetimes<'a, 'b>(_: &'a u8, _: &'b u8) {}
    |
    = help: `async fn` can only accept borrowed values with identical lifetimes
 
-error[E0726]: multiple elided lifetimes used in arguments of `async fn`
+error[E0707]: multiple elided lifetimes used in arguments of `async fn`
   --> $DIR/async-fn-multiple-lifetimes.rs:26:39
    |
 LL | async fn multiple_elided_lifetimes(_: &u8, _: &u8) {}
@@ -28,5 +28,5 @@ LL | async fn multiple_elided_lifetimes(_: &u8, _: &u8) {}
 
 error: aborting due to 3 previous errors
 
-Some errors occurred: E0106, E0725, E0726.
+Some errors occurred: E0106, E0707, E0709.
 For more information about an error, try `rustc --explain E0106`.
diff --git a/src/test/ui/no-args-non-move-async-closure.stderr b/src/test/ui/no-args-non-move-async-closure.stderr
index 34cd0069c04..752816502eb 100644
--- a/src/test/ui/no-args-non-move-async-closure.stderr
+++ b/src/test/ui/no-args-non-move-async-closure.stderr
@@ -1,4 +1,4 @@
-error[E0727]: `async` non-`move` closures with arguments are not currently supported
+error[E0708]: `async` non-`move` closures with arguments are not currently supported
   --> $DIR/no-args-non-move-async-closure.rs:16:13
    |
 LL |     let _ = async |x: u8| {};
@@ -8,4 +8,4 @@ LL |     let _ = async |x: u8| {};
 
 error: aborting due to previous error
 
-For more information about this error, try `rustc --explain E0727`.
+For more information about this error, try `rustc --explain E0708`.