Skip to content

Fix error code numbers #51740

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 24, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/librustc/diagnostics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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`
}
8 changes: 4 additions & 4 deletions src/librustc/hir/lowering.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2045,7 +2045,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")
Expand All @@ -2057,7 +2057,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")
Expand Down Expand Up @@ -3551,7 +3551,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",
)
Expand Down Expand Up @@ -3612,7 +3612,7 @@ impl<'a> LoweringContext<'a> {
span_err!(
this.sess,
fn_decl_span,
E0906,
E0697,
"closures cannot be static"
);
}
Expand Down
6 changes: 3 additions & 3 deletions src/test/ui/async-fn-multiple-lifetimes.stderr
Original file line number Diff line number Diff line change
@@ -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) {}
Expand All @@ -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) {}
Expand All @@ -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`.
4 changes: 2 additions & 2 deletions src/test/ui/no-args-non-move-async-closure.stderr
Original file line number Diff line number Diff line change
@@ -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| {};
Expand All @@ -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`.