Unnamed repository; edit this file 'description' to name the repository.
refactor: disable "unused" lint using parameter name
davidsemakula 2024-02-05
parent d761d86 · commit 33b3b6d
-rw-r--r--crates/ide-diagnostics/src/handlers/mismatched_arg_count.rs7
1 files changed, 3 insertions, 4 deletions
diff --git a/crates/ide-diagnostics/src/handlers/mismatched_arg_count.rs b/crates/ide-diagnostics/src/handlers/mismatched_arg_count.rs
index 9e9822818e..41c762c85b 100644
--- a/crates/ide-diagnostics/src/handlers/mismatched_arg_count.rs
+++ b/crates/ide-diagnostics/src/handlers/mismatched_arg_count.rs
@@ -103,7 +103,7 @@ fn invalid_args_range(
#[cfg(test)]
mod tests {
- use crate::tests::{check_diagnostics, check_diagnostics_with_disabled};
+ use crate::tests::check_diagnostics;
#[test]
fn simple_free_fn_zero() {
@@ -197,16 +197,15 @@ fn f() {
fn method_unknown_receiver() {
// note: this is incorrect code, so there might be errors on this in the
// future, but we shouldn't emit an argument count diagnostic here
- check_diagnostics_with_disabled(
+ check_diagnostics(
r#"
-trait Foo { fn method(&self, arg: usize) {} }
+trait Foo { fn method(&self, _arg: usize) {} }
fn f() {
let x;
x.method();
}
"#,
- std::iter::once("unused_variables".to_string()),
);
}