mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-11-20 03:49:51 +00:00
Fix some more basic clippy lints
This commit is contained in:
parent
9485d6efba
commit
dfdf6fd9f8
9 changed files with 22 additions and 29 deletions
|
|
@ -105,14 +105,12 @@ fn param(p: &mut Parser, m: Marker, flavor: Flavor) -> Variadic {
|
|||
patterns::pattern(p);
|
||||
if variadic_param(p) {
|
||||
res = Variadic(true)
|
||||
} else if p.at(T![:]) {
|
||||
types::ascription(p)
|
||||
} else {
|
||||
if p.at(T![:]) {
|
||||
types::ascription(p)
|
||||
} else {
|
||||
// test_err missing_fn_param_type
|
||||
// fn f(x y: i32, z, t: i32) {}
|
||||
p.error("missing type for function parameter")
|
||||
}
|
||||
// test_err missing_fn_param_type
|
||||
// fn f(x y: i32, z, t: i32) {}
|
||||
p.error("missing type for function parameter")
|
||||
}
|
||||
}
|
||||
// test value_parameters_no_patterns
|
||||
|
|
@ -131,12 +129,10 @@ fn param(p: &mut Parser, m: Marker, flavor: Flavor) -> Variadic {
|
|||
patterns::pattern_single(p);
|
||||
if variadic_param(p) {
|
||||
res = Variadic(true)
|
||||
} else if p.at(T![:]) {
|
||||
types::ascription(p)
|
||||
} else {
|
||||
if p.at(T![:]) {
|
||||
types::ascription(p)
|
||||
} else {
|
||||
p.error("missing type for function parameter")
|
||||
}
|
||||
p.error("missing type for function parameter")
|
||||
}
|
||||
} else {
|
||||
types::type_(p);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue