1
Fork 0

Allow to customize // TODO: comment for deprecated safe autofix

Relevant for the deprecation of `CommandExt::before_exit` in #125970.
This commit is contained in:
Tobias Bucher 2024-07-17 13:45:31 +02:00
parent 591ecb88df
commit 399ef23d2b
7 changed files with 42 additions and 13 deletions

View file

@ -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,