about summary refs log tree commit diff
path: root/compiler/rustc_mir_build/src/errors.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2024-08-14 06:43:26 +0000
committerbors <bors@rust-lang.org>2024-08-14 06:43:26 +0000
commitfbce03b195c02e425fbb12276b8f02349048a75f (patch)
treebb206c0661ae531d01421b5d556da4b65828e786 /compiler/rustc_mir_build/src/errors.rs
parent9859bf27fd9892f48725c59b56aeee2be1d2fbad (diff)
parent24a46c57aebd3a51cae4edc028f06390520c2b71 (diff)
downloadrust-fbce03b195c02e425fbb12276b8f02349048a75f.tar.gz
rust-fbce03b195c02e425fbb12276b8f02349048a75f.zip
Auto merge of #129060 - matthiaskrgr:rollup-s72gpif, r=matthiaskrgr
Rollup of 7 pull requests

Successful merges:

 - #122884 (Optimize integer `pow` by removing the exit branch)
 - #127857 (Allow to customize `// TODO:` comment for deprecated safe autofix)
 - #129034 (Add `#[must_use]` attribute to `Coroutine` trait)
 - #129049 (compiletest: Don't panic on unknown JSON-like output lines)
 - #129050 (Emit a warning instead of an error if `--generate-link-to-definition` is used with other output formats than HTML)
 - #129056 (Fix one usage of target triple in bootstrap)
 - #129058 (Add mw back to review rotation)

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.rs7
1 files changed, 3 insertions, 4 deletions
diff --git a/compiler/rustc_mir_build/src/errors.rs b/compiler/rustc_mir_build/src/errors.rs
index 42eca71ca3f..34577f102d1 100644
--- a/compiler/rustc_mir_build/src/errors.rs
+++ b/compiler/rustc_mir_build/src/errors.rs
@@ -28,6 +28,7 @@ pub(crate) struct CallToDeprecatedSafeFnRequiresUnsafe {
     #[label]
     pub(crate) span: Span,
     pub(crate) function: String,
+    pub(crate) guarantee: String,
     #[subdiagnostic]
     pub(crate) sub: CallToDeprecatedSafeFnRequiresUnsafeSub,
 }
@@ -35,10 +36,8 @@ pub(crate) struct CallToDeprecatedSafeFnRequiresUnsafe {
 #[derive(Subdiagnostic)]
 #[multipart_suggestion(mir_build_suggestion, applicability = "machine-applicable")]
 pub(crate) struct CallToDeprecatedSafeFnRequiresUnsafeSub {
-    pub(crate) indent: String,
-    #[suggestion_part(
-        code = "{indent}// TODO: Audit that the environment access only happens in single-threaded code.\n" // ignore-tidy-todo
-    )]
+    pub(crate) start_of_line_suggestion: String,
+    #[suggestion_part(code = "{start_of_line_suggestion}")]
     pub(crate) start_of_line: Span,
     #[suggestion_part(code = "unsafe {{ ")]
     pub(crate) left: Span,