Fix some more basic clippy lints
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user