diff options
| author | bors <bors@rust-lang.org> | 2024-11-20 21:58:38 +0000 | 
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-11-20 21:58:38 +0000 | 
| commit | 2d0ea7956c45de6e421fd579e2ded27be405dec6 (patch) | |
| tree | 498db3f13bbed2f65bcc411df4b682903552727e /compiler/rustc_mir_build/src/errors.rs | |
| parent | 3fee0f12e4f595948f8f54f57c8b7a7a58127124 (diff) | |
| parent | 71d07dd0308953817757492628b159ebde17e89b (diff) | |
| download | rust-2d0ea7956c45de6e421fd579e2ded27be405dec6.tar.gz rust-2d0ea7956c45de6e421fd579e2ded27be405dec6.zip | |
Auto merge of #133261 - matthiaskrgr:rollup-ekui4we, r=matthiaskrgr
Rollup of 6 pull requests Successful merges: - #129838 (uefi: process: Add args support) - #130800 (Mark `get_mut` and `set_position` in `std::io::Cursor` as const.) - #132708 (Point at `const` definition when used instead of a binding in a `let` statement) - #133226 (Make `PointerLike` opt-in instead of built-in) - #133244 (Account for `wasm32v1-none` when exporting TLS symbols) - #133257 (Add `UnordMap::clear` method) r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_mir_build/src/errors.rs')
| -rw-r--r-- | compiler/rustc_mir_build/src/errors.rs | 8 | 
1 files changed, 5 insertions, 3 deletions
| diff --git a/compiler/rustc_mir_build/src/errors.rs b/compiler/rustc_mir_build/src/errors.rs index 62c6d85b73f..676f7c98b8f 100644 --- a/compiler/rustc_mir_build/src/errors.rs +++ b/compiler/rustc_mir_build/src/errors.rs @@ -860,8 +860,10 @@ pub(crate) struct PatternNotCovered<'s, 'tcx> { pub(crate) uncovered: Uncovered, #[subdiagnostic] pub(crate) inform: Option<Inform>, + #[label(mir_build_confused)] + pub(crate) interpreted_as_const: Option<Span>, #[subdiagnostic] - pub(crate) interpreted_as_const: Option<InterpretedAsConst>, + pub(crate) interpreted_as_const_sugg: Option<InterpretedAsConst>, #[subdiagnostic] pub(crate) adt_defined_here: Option<AdtDefinedHere<'tcx>>, #[note(mir_build_privately_uninhabited)] @@ -911,9 +913,9 @@ impl<'tcx> Subdiagnostic for AdtDefinedHere<'tcx> { #[suggestion( mir_build_interpreted_as_const, code = "{variable}_var", - applicability = "maybe-incorrect" + applicability = "maybe-incorrect", + style = "verbose" )] -#[label(mir_build_confused)] pub(crate) struct InterpretedAsConst { #[primary_span] pub(crate) span: Span, | 
