Skip to content

Commit 97319b2

Browse files
committed
Changing error messages and renaming tests #63127
`async-await/no-args-non-move-async-closure` `generator/no-arguments-on-generators`
1 parent e0ce9f8 commit 97319b2

6 files changed

+6
-6
lines changed

src/librustc/error_codes.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -2231,15 +2231,15 @@ register_diagnostics! {
22312231
E0495, // cannot infer an appropriate lifetime due to conflicting requirements
22322232
E0566, // conflicting representation hints
22332233
E0623, // lifetime mismatch where both parameters are anonymous regions
2234-
E0628, // generators cannot have explicit arguments
2234+
E0628, // generators cannot have explicit parameters
22352235
E0631, // type mismatch in closure arguments
22362236
E0637, // "'_" is not a valid lifetime bound
22372237
E0657, // `impl Trait` can only capture lifetimes bound at the fn level
22382238
E0687, // in-band lifetimes cannot be used in `fn`/`Fn` syntax
22392239
E0688, // in-band lifetimes cannot be mixed with explicit lifetime binders
22402240
E0697, // closures cannot be static
22412241
E0707, // multiple elided lifetimes used in arguments of `async fn`
2242-
E0708, // `async` non-`move` closures with arguments are not currently supported
2242+
E0708, // `async` non-`move` closures with parameters are not currently supported
22432243
E0709, // multiple different lifetimes used in arguments of `async fn`
22442244
E0710, // an unknown tool name found in scoped lint
22452245
E0711, // a feature has been declared with conflicting stability attributes

src/librustc/hir/lowering/expr.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -724,7 +724,7 @@ impl LoweringContext<'_> {
724724
self.sess,
725725
fn_decl_span,
726726
E0628,
727-
"generators cannot have explicit arguments"
727+
"generators cannot have explicit parameters"
728728
);
729729
self.sess.abort_if_errors();
730730
}
@@ -775,7 +775,7 @@ impl LoweringContext<'_> {
775775
this.sess,
776776
fn_decl_span,
777777
E0708,
778-
"`async` non-`move` closures with arguments are not currently supported",
778+
"`async` non-`move` closures with parameters are not currently supported",
779779
)
780780
.help(
781781
"consider using `let` statements to manually capture \

src/test/ui/async-await/no-args-non-move-async-closure.stderr renamed to src/test/ui/async-await/no-params-non-move-async-closure.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0708]: `async` non-`move` closures with parameters are not currently supported
2-
--> $DIR/no-args-non-move-async-closure.rs:6:13
2+
--> $DIR/no-params-non-move-async-closure.rs:6:13
33
|
44
LL | let _ = async |x: u8| {};
55
| ^^^^^^^^^^^^^

src/test/ui/generator/no-arguments-on-generators.stderr renamed to src/test/ui/generator/no-parameters-on-generators.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0628]: generators cannot have explicit parameters
2-
--> $DIR/no-arguments-on-generators.rs:4:15
2+
--> $DIR/no-parameters-on-generators.rs:4:15
33
|
44
LL | let gen = |start| {
55
| ^^^^^^^

0 commit comments

Comments
 (0)