diff options
| author | bors <bors@rust-lang.org> | 2024-02-04 18:51:28 +0000 | 
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-02-04 18:51:28 +0000 | 
| commit | 4e3eed48926b8b70eee8beb082e37ffa4985c0ed (patch) | |
| tree | f479799179b27abe3959cf04e202d8f08f96fe90 /compiler/rustc_parse/src | |
| parent | 671eb38a4e5fadb75548841ec7ae31224eea0593 (diff) | |
| parent | 326839bf7f962495b79bdd93dfb886194a5ba13c (diff) | |
| download | rust-4e3eed48926b8b70eee8beb082e37ffa4985c0ed.tar.gz rust-4e3eed48926b8b70eee8beb082e37ffa4985c0ed.zip | |
Auto merge of #120620 - matthiaskrgr:rollup-sscmbsm, r=matthiaskrgr
Rollup of 10 pull requests Successful merges: - #119543 (add avx512fp16 to x86 target features) - #120004 (Release notes for 1.76) - #120562 (Revert unsound libcore changes) - #120566 (coverage: Use normal `edition:` headers in coverage tests) - #120570 (Suggest changing type to const parameters if we encounter a type in the trait bound position) - #120571 (Miscellaneous diagnostics cleanups) - #120573 (Remove `BorrowckErrors::tainted_by_errors`) - #120592 (Remove unnecessary `.to_string()`/`.as_str()`s) - #120610 (hir: Remove the generic type parameter from `MaybeOwned`) - #120616 (Fix ICE on field access on a tainted type after const-eval failure) Failed merges: - #120569 (coverage: Improve handling of function/closure spans) r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_parse/src')
| -rw-r--r-- | compiler/rustc_parse/src/lib.rs | 2 | ||||
| -rw-r--r-- | compiler/rustc_parse/src/parser/expr.rs | 2 | ||||
| -rw-r--r-- | compiler/rustc_parse/src/parser/generics.rs | 2 | ||||
| -rw-r--r-- | compiler/rustc_parse/src/parser/item.rs | 2 | 
4 files changed, 4 insertions, 4 deletions
| diff --git a/compiler/rustc_parse/src/lib.rs b/compiler/rustc_parse/src/lib.rs index 49e036c3801..d5fa1108687 100644 --- a/compiler/rustc_parse/src/lib.rs +++ b/compiler/rustc_parse/src/lib.rs @@ -39,7 +39,7 @@ rustc_fluent_macro::fluent_messages! { "../messages.ftl" } // uses a HOF to parse anything, and <source> includes file and // `source_str`. -/// A variant of 'panictry!' that works on a `Vec<Diagnostic>` instead of a single +/// A variant of 'panictry!' that works on a `Vec<DiagnosticBuilder>` instead of a single /// `DiagnosticBuilder`. macro_rules! panictry_buffer { ($e:expr) => {{ diff --git a/compiler/rustc_parse/src/parser/expr.rs b/compiler/rustc_parse/src/parser/expr.rs index 9f748e2a3fe..e36a648e203 100644 --- a/compiler/rustc_parse/src/parser/expr.rs +++ b/compiler/rustc_parse/src/parser/expr.rs @@ -3288,7 +3288,7 @@ impl<'a> Parser<'a> { } else { Applicability::MaybeIncorrect }; - err.span_suggestion_verbose(sugg_sp, msg, "=> ".to_string(), applicability); + err.span_suggestion_verbose(sugg_sp, msg, "=> ", applicability); } } err diff --git a/compiler/rustc_parse/src/parser/generics.rs b/compiler/rustc_parse/src/parser/generics.rs index 48cf04f7790..e059e707491 100644 --- a/compiler/rustc_parse/src/parser/generics.rs +++ b/compiler/rustc_parse/src/parser/generics.rs @@ -148,7 +148,7 @@ impl<'a> Parser<'a> { .with_span_suggestion_verbose( mistyped_const_ident.span, "use the `const` keyword", - kw::Const.as_str(), + kw::Const, Applicability::MachineApplicable, ) .emit(); diff --git a/compiler/rustc_parse/src/parser/item.rs b/compiler/rustc_parse/src/parser/item.rs index 9a77643f951..8050b34956c 100644 --- a/compiler/rustc_parse/src/parser/item.rs +++ b/compiler/rustc_parse/src/parser/item.rs @@ -1453,7 +1453,7 @@ impl<'a> Parser<'a> { err.span_suggestion_verbose( prev_span, "perhaps you meant to use `struct` here", - "struct".to_string(), + "struct", Applicability::MaybeIncorrect, ); } | 
