diff --git a/compiler/rustc_parse/src/parser/mod.rs b/compiler/rustc_parse/src/parser/mod.rs index b7c9a88b23f43..7ee7dd07a8a0c 100644 --- a/compiler/rustc_parse/src/parser/mod.rs +++ b/compiler/rustc_parse/src/parser/mod.rs @@ -885,7 +885,7 @@ impl<'a> Parser<'a> { } expect_err.set_primary_message( - "closure body that contain statements must be surrounded by braces", + "closure bodies that contain statements must be surrounded by braces", ); let preceding_pipe_span = right_pipe_span; diff --git a/src/test/ui/expr/malformed_closure/missing_braces_around_block.fixed b/src/test/ui/expr/malformed_closure/missing_braces_around_block.fixed index 651ca6037aea5..c50b9a12b6d44 100644 --- a/src/test/ui/expr/malformed_closure/missing_braces_around_block.fixed +++ b/src/test/ui/expr/malformed_closure/missing_braces_around_block.fixed @@ -12,7 +12,7 @@ fn main() { let num = 5; (1..num).reduce(|a, b| { - //~^ ERROR: closure body that contain statements must be surrounded by braces + //~^ ERROR: closure bodies that contain statements must be surrounded by braces println!("{}", a); a * b }).unwrap(); diff --git a/src/test/ui/expr/malformed_closure/missing_braces_around_block.rs b/src/test/ui/expr/malformed_closure/missing_braces_around_block.rs index 409ebcd65ad5e..58c81f3a6e2a9 100644 --- a/src/test/ui/expr/malformed_closure/missing_braces_around_block.rs +++ b/src/test/ui/expr/malformed_closure/missing_braces_around_block.rs @@ -12,7 +12,7 @@ fn main() { let num = 5; (1..num).reduce(|a, b| - //~^ ERROR: closure body that contain statements must be surrounded by braces + //~^ ERROR: closure bodies that contain statements must be surrounded by braces println!("{}", a); a * b ).unwrap(); diff --git a/src/test/ui/expr/malformed_closure/missing_braces_around_block.stderr b/src/test/ui/expr/malformed_closure/missing_braces_around_block.stderr index 260440a74999f..b35adbdd26ec3 100644 --- a/src/test/ui/expr/malformed_closure/missing_braces_around_block.stderr +++ b/src/test/ui/expr/malformed_closure/missing_braces_around_block.stderr @@ -1,4 +1,4 @@ -error: closure body that contain statements must be surrounded by braces +error: closure bodies that contain statements must be surrounded by braces --> $DIR/missing_braces_around_block.rs:14:26 | LL | (1..num).reduce(|a, b|