Skip to content

Commit 01cc982

Browse files
committed
Auto merge of #51740 - GuillaumeGomez:fix-error-code-numbers, r=cramertj
Fix error code numbers Fixes issue created by #51580. r? @cramertj
2 parents 3874676 + 8f1ef6e commit 01cc982

File tree

4 files changed

+13
-13
lines changed

4 files changed

+13
-13
lines changed

src/librustc/diagnostics.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -2132,9 +2132,9 @@ register_diagnostics! {
21322132
E0687, // in-band lifetimes cannot be used in `fn`/`Fn` syntax
21332133
E0688, // in-band lifetimes cannot be mixed with explicit lifetime binders
21342134

2135-
E0906, // closures cannot be static
2135+
E0697, // closures cannot be static
21362136

2137-
E0725, // multiple different lifetimes used in arguments of `async fn`
2138-
E0726, // multiple elided lifetimes used in arguments of `async fn`
2139-
E0727, // `async` non-`move` closures with arguments are not currently supported
2137+
E0707, // multiple elided lifetimes used in arguments of `async fn`
2138+
E0708, // `async` non-`move` closures with arguments are not currently supported
2139+
E0709, // multiple different lifetimes used in arguments of `async fn`
21402140
}

src/librustc/hir/lowering.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -2043,7 +2043,7 @@ impl<'a> LoweringContext<'a> {
20432043
struct_span_err!(
20442044
self.context.sess,
20452045
current_lt_span.between(lifetime.span),
2046-
E0725,
2046+
E0709,
20472047
"multiple different lifetimes used in arguments of `async fn`",
20482048
)
20492049
.span_label(current_lt_span, "first lifetime here")
@@ -2055,7 +2055,7 @@ impl<'a> LoweringContext<'a> {
20552055
struct_span_err!(
20562056
self.context.sess,
20572057
current_lt_span.between(lifetime.span),
2058-
E0726,
2058+
E0707,
20592059
"multiple elided lifetimes used in arguments of `async fn`",
20602060
)
20612061
.span_label(current_lt_span, "first lifetime here")
@@ -3549,7 +3549,7 @@ impl<'a> LoweringContext<'a> {
35493549
struct_span_err!(
35503550
this.sess,
35513551
fn_decl_span,
3552-
E0727,
3552+
E0708,
35533553
"`async` non-`move` closures with arguments \
35543554
are not currently supported",
35553555
)
@@ -3610,7 +3610,7 @@ impl<'a> LoweringContext<'a> {
36103610
span_err!(
36113611
this.sess,
36123612
fn_decl_span,
3613-
E0906,
3613+
E0697,
36143614
"closures cannot be static"
36153615
);
36163616
}

src/test/ui/async-fn-multiple-lifetimes.stderr

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error[E0725]: multiple different lifetimes used in arguments of `async fn`
1+
error[E0709]: multiple different lifetimes used in arguments of `async fn`
22
--> $DIR/async-fn-multiple-lifetimes.rs:17:49
33
|
44
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) {}
88
|
99
= help: `async fn` can only accept borrowed values with identical lifetimes
1010

11-
error[E0726]: multiple elided lifetimes used in arguments of `async fn`
11+
error[E0707]: multiple elided lifetimes used in arguments of `async fn`
1212
--> $DIR/async-fn-multiple-lifetimes.rs:26:39
1313
|
1414
LL | async fn multiple_elided_lifetimes(_: &u8, _: &u8) {}
@@ -28,5 +28,5 @@ LL | async fn multiple_elided_lifetimes(_: &u8, _: &u8) {}
2828

2929
error: aborting due to 3 previous errors
3030

31-
Some errors occurred: E0106, E0725, E0726.
31+
Some errors occurred: E0106, E0707, E0709.
3232
For more information about an error, try `rustc --explain E0106`.
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error[E0727]: `async` non-`move` closures with arguments are not currently supported
1+
error[E0708]: `async` non-`move` closures with arguments are not currently supported
22
--> $DIR/no-args-non-move-async-closure.rs:16:13
33
|
44
LL | let _ = async |x: u8| {};
@@ -8,4 +8,4 @@ LL | let _ = async |x: u8| {};
88

99
error: aborting due to previous error
1010

11-
For more information about this error, try `rustc --explain E0727`.
11+
For more information about this error, try `rustc --explain E0708`.

0 commit comments

Comments
 (0)