Skip to content

Commit

Permalink
Changing error messages and renaming tests #63127
Browse files Browse the repository at this point in the history
`async-await/no-args-non-move-async-closure`
`generator/no-arguments-on-generators`
  • Loading branch information
kper committed Aug 27, 2019
1 parent e0ce9f8 commit 97319b2
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/librustc/error_codes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2231,15 +2231,15 @@ register_diagnostics! {
E0495, // cannot infer an appropriate lifetime due to conflicting requirements
E0566, // conflicting representation hints
E0623, // lifetime mismatch where both parameters are anonymous regions
E0628, // generators cannot have explicit arguments
E0628, // generators cannot have explicit parameters
E0631, // type mismatch in closure arguments
E0637, // "'_" is not a valid lifetime bound
E0657, // `impl Trait` can only capture lifetimes bound at the fn level
E0687, // in-band lifetimes cannot be used in `fn`/`Fn` syntax
E0688, // in-band lifetimes cannot be mixed with explicit lifetime binders
E0697, // closures cannot be static
E0707, // multiple elided lifetimes used in arguments of `async fn`
E0708, // `async` non-`move` closures with arguments are not currently supported
E0708, // `async` non-`move` closures with parameters are not currently supported
E0709, // multiple different lifetimes used in arguments of `async fn`
E0710, // an unknown tool name found in scoped lint
E0711, // a feature has been declared with conflicting stability attributes
Expand Down
4 changes: 2 additions & 2 deletions src/librustc/hir/lowering/expr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -724,7 +724,7 @@ impl LoweringContext<'_> {
self.sess,
fn_decl_span,
E0628,
"generators cannot have explicit arguments"
"generators cannot have explicit parameters"
);
self.sess.abort_if_errors();
}
Expand Down Expand Up @@ -775,7 +775,7 @@ impl LoweringContext<'_> {
this.sess,
fn_decl_span,
E0708,
"`async` non-`move` closures with arguments are not currently supported",
"`async` non-`move` closures with parameters are not currently supported",
)
.help(
"consider using `let` statements to manually capture \
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0708]: `async` non-`move` closures with parameters are not currently supported
--> $DIR/no-args-non-move-async-closure.rs:6:13
--> $DIR/no-params-non-move-async-closure.rs:6:13
|
LL | let _ = async |x: u8| {};
| ^^^^^^^^^^^^^
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0628]: generators cannot have explicit parameters
--> $DIR/no-arguments-on-generators.rs:4:15
--> $DIR/no-parameters-on-generators.rs:4:15
|
LL | let gen = |start| {
| ^^^^^^^
Expand Down

0 comments on commit 97319b2

Please sign in to comment.