about summary refs log tree commit diff
path: root/compiler/rustc_mir_build/src/errors.rs
diff options
context:
space:
mode:
authorTobias Bucher <tobiasbucher5991@gmail.com>2024-07-17 13:45:31 +0200
committerTobias Bucher <tobiasbucher5991@gmail.com>2024-08-13 11:32:24 +0200
commit399ef23d2bf2b1619d360a87de9b83edf9d99762 (patch)
tree071223c58c3c1bbf57696e600671b7b60c3154e4 /compiler/rustc_mir_build/src/errors.rs
parent591ecb88dffdb0f233e2fae74fd3d7c81d65ff0c (diff)
downloadrust-399ef23d2bf2b1619d360a87de9b83edf9d99762.tar.gz
rust-399ef23d2bf2b1619d360a87de9b83edf9d99762.zip
Allow to customize `// TODO:` comment for deprecated safe autofix
Relevant for the deprecation of `CommandExt::before_exit` in #125970.
Diffstat (limited to 'compiler/rustc_mir_build/src/errors.rs')
-rw-r--r--compiler/rustc_mir_build/src/errors.rs6
1 files changed, 2 insertions, 4 deletions
diff --git a/compiler/rustc_mir_build/src/errors.rs b/compiler/rustc_mir_build/src/errors.rs
index 42eca71ca3f..8c45f949e43 100644
--- a/compiler/rustc_mir_build/src/errors.rs
+++ b/compiler/rustc_mir_build/src/errors.rs
@@ -35,10 +35,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,