mirror of
https://github.com/astral-sh/ruff.git
synced 2025-09-30 22:01:47 +00:00
Add #[automatically_derived]
to derived impls (#8080)
This commit is contained in:
parent
256b98ab9a
commit
a525f09008
5 changed files with 6 additions and 0 deletions
|
@ -53,6 +53,7 @@ pub(crate) fn violation(violation: &ItemStruct) -> Result<TokenStream> {
|
|||
#[derive(Debug, PartialEq, Eq)]
|
||||
#violation
|
||||
|
||||
#[automatically_derived]
|
||||
impl From<#ident> for ruff_diagnostics::DiagnosticKind {
|
||||
fn from(value: #ident) -> Self {
|
||||
use ruff_diagnostics::Violation;
|
||||
|
@ -76,6 +77,7 @@ pub(crate) fn violation(violation: &ItemStruct) -> Result<TokenStream> {
|
|||
}
|
||||
}
|
||||
|
||||
#[automatically_derived]
|
||||
impl From<#ident> for ruff_diagnostics::DiagnosticKind {
|
||||
fn from(value: #ident) -> Self {
|
||||
use ruff_diagnostics::Violation;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue