adjust doc

This commit is contained in:
weartist 2025-04-20 21:38:04 +08:00
parent 412c308011
commit 2800591d9c
1 changed files with 15 additions and 9 deletions

View File

@ -49,9 +49,11 @@ use crate::Locator;
/// ``` /// ```
/// ///
/// ## Fix safety /// ## Fix safety
/// This rule's fix is marked as unsafe because comments associated with the /// This rule's fix is marked as unsafe because:
/// exception argument may not be reliably matched to their original code /// - Comments associated with the exception argument may not be reliably matched
/// positions after the fix is applied. /// to their original code positions after the fix is applied.
/// - The introduced `msg` variable may shadow an existing variable in the same
/// scope, potentially changing program behavior.
#[derive(ViolationMetadata)] #[derive(ViolationMetadata)]
pub(crate) struct RawStringInException; pub(crate) struct RawStringInException;
@ -109,9 +111,11 @@ impl Violation for RawStringInException {
/// ``` /// ```
/// ///
/// ## Fix safety /// ## Fix safety
/// This rule's fix is marked as unsafe because comments associated with the /// This rule's fix is marked as unsafe because:
/// exception argument may not be reliably matched to their original code /// - Comments associated with the exception argument may not be reliably matched
/// positions after the fix is applied. /// to their original code positions after the fix is applied.
/// - The introduced `msg` variable may shadow an existing variable in the same
/// scope, potentially changing program behavior.
#[derive(ViolationMetadata)] #[derive(ViolationMetadata)]
pub(crate) struct FStringInException; pub(crate) struct FStringInException;
@ -170,9 +174,11 @@ impl Violation for FStringInException {
/// ``` /// ```
/// ///
/// ## Fix safety /// ## Fix safety
/// This rule's fix is marked as unsafe because comments associated with the /// This rule's fix is marked as unsafe because:
/// exception argument may not be reliably matched to their original code /// - Comments associated with the exception argument may not be reliably matched
/// positions after the fix is applied. /// to their original code positions after the fix is applied.
/// - The introduced `msg` variable may shadow an existing variable in the same
/// scope, potentially changing program behavior.
#[derive(ViolationMetadata)] #[derive(ViolationMetadata)]
pub(crate) struct DotFormatInException; pub(crate) struct DotFormatInException;