mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-27 13:33:31 +00:00
refactor: disable "unused" lint using parameter name
This commit is contained in:
parent
d761d86f03
commit
33b3b6dbf9
1 changed files with 3 additions and 4 deletions
|
@ -103,7 +103,7 @@ fn invalid_args_range(
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests {
|
mod tests {
|
||||||
use crate::tests::{check_diagnostics, check_diagnostics_with_disabled};
|
use crate::tests::check_diagnostics;
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn simple_free_fn_zero() {
|
fn simple_free_fn_zero() {
|
||||||
|
@ -197,16 +197,15 @@ fn f() {
|
||||||
fn method_unknown_receiver() {
|
fn method_unknown_receiver() {
|
||||||
// note: this is incorrect code, so there might be errors on this in the
|
// 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
|
// future, but we shouldn't emit an argument count diagnostic here
|
||||||
check_diagnostics_with_disabled(
|
check_diagnostics(
|
||||||
r#"
|
r#"
|
||||||
trait Foo { fn method(&self, arg: usize) {} }
|
trait Foo { fn method(&self, _arg: usize) {} }
|
||||||
|
|
||||||
fn f() {
|
fn f() {
|
||||||
let x;
|
let x;
|
||||||
x.method();
|
x.method();
|
||||||
}
|
}
|
||||||
"#,
|
"#,
|
||||||
std::iter::once("unused_variables".to_string()),
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue