diff options
| author | bors <bors@rust-lang.org> | 2024-03-09 15:37:01 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-03-09 15:37:01 +0000 |
| commit | 8401645716b26a8b4c6974dc0680e55e81e9e8a1 (patch) | |
| tree | ca23dab2f3839143d11760c3ce8db630cbc5a34a /compiler/rustc_parse/src/parser | |
| parent | b054da815501bafb24a08284151d32862f7a3a13 (diff) | |
| parent | 7193ce0061625647166281b1965cfa320e170eb7 (diff) | |
| download | rust-8401645716b26a8b4c6974dc0680e55e81e9e8a1.tar.gz rust-8401645716b26a8b4c6974dc0680e55e81e9e8a1.zip | |
Auto merge of #122241 - matthiaskrgr:rollup-r8q87ok, r=matthiaskrgr
Rollup of 12 pull requests Successful merges: - #121358 (Reduce alignment of TypeId to u64 alignment) - #121813 (Misc improvements to non local defs lint implementation) - #122160 (Eagerly translate `HelpUseLatestEdition` in parser diagnostics) - #122178 (ci: add a runner for vanilla LLVM 18) - #122187 (Move metadata header and version checks together) - #122209 (fix incorrect path resolution in tidy) - #122215 (Some tweaks to the parallel query cycle handler) - #122223 (Fix typo in `VisitorResult`) - #122224 (Add missing regression tests) - #122232 (library/core: fix a comment, and a cfg(miri) warning) - #122233 (miri: do not apply aliasing restrictions to Box with custom allocator) - #122237 (Remove `Ord` from `ClosureKind`) r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_parse/src/parser')
| -rw-r--r-- | compiler/rustc_parse/src/parser/diagnostics.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_parse/src/parser/diagnostics.rs b/compiler/rustc_parse/src/parser/diagnostics.rs index 2f7ac7d3a12..de088b9364b 100644 --- a/compiler/rustc_parse/src/parser/diagnostics.rs +++ b/compiler/rustc_parse/src/parser/diagnostics.rs @@ -667,7 +667,7 @@ impl<'a> Parser<'a> { { err.note("you may be trying to write a c-string literal"); err.note("c-string literals require Rust 2021 or later"); - HelpUseLatestEdition::new().add_to_diagnostic(&mut err); + err.subdiagnostic(self.dcx(), HelpUseLatestEdition::new()); } // `pub` may be used for an item or `pub(crate)` |
