mirror of
https://github.com/astral-sh/ruff.git
synced 2025-09-30 22:01:47 +00:00
Disallow unreachable_pub
(#4314)
This commit is contained in:
parent
97802e7466
commit
c10a4535b9
444 changed files with 1376 additions and 1106 deletions
|
@ -45,7 +45,7 @@ fn get_docs(attrs: &[Attribute]) -> Result<String> {
|
|||
Ok(explanation)
|
||||
}
|
||||
|
||||
pub fn violation(violation: &ItemStruct) -> Result<TokenStream> {
|
||||
pub(crate) fn violation(violation: &ItemStruct) -> Result<TokenStream> {
|
||||
let ident = &violation.ident;
|
||||
let explanation = get_docs(&violation.attrs)?;
|
||||
let violation = if explanation.trim().is_empty() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue