diff options
| author | bors <bors@rust-lang.org> | 2022-06-29 18:42:19 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-06-29 18:42:19 +0000 |
| commit | ddcbba036aee08f0709f98a92a342a278eae5c05 (patch) | |
| tree | 746cce42c59c782314757a884b2630e8e9d1c1c2 /compiler/rustc_parse/src/parser | |
| parent | 3fcf43bb0f3e86c16a88f239da18a1729a94d244 (diff) | |
| parent | d34c4ca9be41d14d8eb460f23abb353ce3be8ae7 (diff) | |
| download | rust-ddcbba036aee08f0709f98a92a342a278eae5c05.tar.gz rust-ddcbba036aee08f0709f98a92a342a278eae5c05.zip | |
Auto merge of #98680 - matthiaskrgr:rollup-1bkrrn9, r=matthiaskrgr
Rollup of 10 pull requests Successful merges: - #98434 (Ensure that `static_crt` is set in the bootstrapper whenever using `cc-rs` to get a compiler command line.) - #98636 (Triagebot: Fix mentions word wrapping.) - #98642 (Fix #98260) - #98643 (Improve pretty printing of valtrees for references) - #98646 (rustdoc: fix bugs in main.js popover help and settings) - #98647 (Update cargo) - #98652 (`alloc`: clean and ensure `no_global_oom_handling` builds are warning-free) - #98660 (Unbreak stage1 tests via ignore-stage1 in `proc-macro/invalid-punct-ident-1.rs`.) - #98665 (Use verbose help for deprecation suggestion) - #98668 (Avoid some `&str` to `String` conversions with `MultiSpan::push_span_label`) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_parse/src/parser')
| -rw-r--r-- | compiler/rustc_parse/src/parser/mod.rs | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/compiler/rustc_parse/src/parser/mod.rs b/compiler/rustc_parse/src/parser/mod.rs index acdf121522a..00002f6f59b 100644 --- a/compiler/rustc_parse/src/parser/mod.rs +++ b/compiler/rustc_parse/src/parser/mod.rs @@ -891,22 +891,19 @@ impl<'a> Parser<'a> { let mut first_note = MultiSpan::from(vec![initial_semicolon]); first_note.push_span_label( initial_semicolon, - "this `;` turns the preceding closure into a statement".to_string(), + "this `;` turns the preceding closure into a statement", ); first_note.push_span_label( closure_spans.body, - "this expression is a statement because of the trailing semicolon".to_string(), + "this expression is a statement because of the trailing semicolon", ); expect_err.span_note(first_note, "statement found outside of a block"); let mut second_note = MultiSpan::from(vec![closure_spans.whole_closure]); - second_note.push_span_label( - closure_spans.whole_closure, - "this is the parsed closure...".to_string(), - ); + second_note.push_span_label(closure_spans.whole_closure, "this is the parsed closure..."); second_note.push_span_label( following_token_span, - "...but likely you meant the closure to end here".to_string(), + "...but likely you meant the closure to end here", ); expect_err.span_note(second_note, "the closure body may be incorrectly delimited"); |
