Skip to content

Commit

Permalink
use ViolationMetadata derive macro
Browse files Browse the repository at this point in the history
  • Loading branch information
dylwil3 committed Jan 2, 2025
1 parent 700b732 commit 902d641
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions crates/ruff_linter/src/rules/ruff/rules/unreachable.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use ruff_text_size::{Ranged, TextRange, TextSize};

use ruff_diagnostics::{Diagnostic, Violation};
use ruff_index::{IndexSlice, IndexVec};
use ruff_macros::{derive_message_formats, newtype_index, violation};
use ruff_macros::{derive_message_formats, newtype_index, ViolationMetadata};

/// ## What it does
/// Checks for unreachable code.
Expand All @@ -30,8 +30,8 @@ use ruff_macros::{derive_message_formats, newtype_index, violation};
/// def function():
/// return "reachable"
/// ```
#[violation]
pub struct UnreachableCode {
#[derive(ViolationMetadata)]
pub(crate) struct UnreachableCode {
name: String,
}

Expand Down

0 comments on commit 902d641

Please sign in to comment.