mirror of
https://github.com/astral-sh/ruff.git
synced 2025-08-04 18:58:04 +00:00
Use #[expect(lint)]
over #[allow(lint)]
where possible (#17822)
This commit is contained in:
parent
8535af8516
commit
fa628018b2
148 changed files with 221 additions and 268 deletions
|
@ -376,7 +376,7 @@ struct Renderable<'r> {
|
|||
// (At time of writing, 2025-03-13, we currently render the diagnostic
|
||||
// ID into the main message of the parent diagnostic. We don't use this
|
||||
// specific field to do that though.)
|
||||
#[allow(dead_code)]
|
||||
#[expect(dead_code)]
|
||||
id: &'r str,
|
||||
diagnostics: Vec<RenderableDiagnostic<'r>>,
|
||||
}
|
||||
|
|
|
@ -50,7 +50,6 @@ impl OsSystem {
|
|||
|
||||
Self {
|
||||
// Spreading `..Default` because it isn't possible to feature gate the initializer of a single field.
|
||||
#[allow(clippy::needless_update)]
|
||||
inner: Arc::new(OsSystemInner {
|
||||
cwd: cwd.to_path_buf(),
|
||||
case_sensitivity,
|
||||
|
|
|
@ -35,7 +35,7 @@ impl WalkDirectoryBuilder {
|
|||
/// Each additional path is traversed recursively.
|
||||
/// This should be preferred over building multiple
|
||||
/// walkers since it enables reusing resources.
|
||||
#[allow(clippy::should_implement_trait)]
|
||||
#[expect(clippy::should_implement_trait)]
|
||||
pub fn add(mut self, path: impl AsRef<SystemPath>) -> Self {
|
||||
self.paths.push(path.as_ref().to_path_buf());
|
||||
self
|
||||
|
|
|
@ -172,7 +172,7 @@ impl Default for VendoredFileSystem {
|
|||
/// that users of the `VendoredFileSystem` could realistically need.
|
||||
/// For debugging purposes, however, we want to have all information
|
||||
/// available.
|
||||
#[allow(unused)]
|
||||
#[expect(unused)]
|
||||
#[derive(Debug)]
|
||||
struct ZipFileDebugInfo {
|
||||
crc32_hash: u32,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue