Add TODO comment to unsafe env modification
Addresses https://github.com/rust-lang/rust/pull/124636#issuecomment-2132119534. I think that the diff display regresses a little, because it's no longer showing the `+` to show where the `unsafe {}` is added. I think it's still fine.
This commit is contained in:
parent
39c3b86eaa
commit
4f5fb3126f
4 changed files with 16 additions and 4 deletions
|
@ -33,6 +33,11 @@ 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: Span,
|
||||
#[suggestion_part(code = "unsafe {{ ")]
|
||||
pub(crate) left: Span,
|
||||
#[suggestion_part(code = " }}")]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue