mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-02 14:51:48 +00:00
nonminimal_bool
This commit is contained in:
parent
e58b683201
commit
e6f9f4c0e4
3 changed files with 2 additions and 3 deletions
|
@ -177,7 +177,6 @@ format_collect = "allow"
|
||||||
large_enum_variant = "allow"
|
large_enum_variant = "allow"
|
||||||
needless_doctest_main = "allow"
|
needless_doctest_main = "allow"
|
||||||
new_without_default = "allow"
|
new_without_default = "allow"
|
||||||
nonminimal_bool = "allow"
|
|
||||||
non_canonical_clone_impl = "allow"
|
non_canonical_clone_impl = "allow"
|
||||||
non_canonical_partial_ord_impl = "allow"
|
non_canonical_partial_ord_impl = "allow"
|
||||||
non_minimal_cfg = "allow"
|
non_minimal_cfg = "allow"
|
||||||
|
|
|
@ -100,7 +100,7 @@ fn validate_type_recursively(
|
||||||
}
|
}
|
||||||
(_, Some(ty)) => match ty.as_builtin() {
|
(_, Some(ty)) => match ty.as_builtin() {
|
||||||
// `const A: str` is not correct, but `const A: &builtin` is.
|
// `const A: str` is not correct, but `const A: &builtin` is.
|
||||||
Some(builtin) if refed || (!refed && !builtin.is_str()) => Some(()),
|
Some(builtin) if refed || !builtin.is_str() => Some(()),
|
||||||
_ => None,
|
_ => None,
|
||||||
},
|
},
|
||||||
_ => None,
|
_ => None,
|
||||||
|
|
|
@ -23,7 +23,7 @@ impl ActiveParameter {
|
||||||
|
|
||||||
let idx = active_parameter?;
|
let idx = active_parameter?;
|
||||||
let mut params = signature.params(sema.db);
|
let mut params = signature.params(sema.db);
|
||||||
if !(idx < params.len()) {
|
if idx >= params.len() {
|
||||||
cov_mark::hit!(too_many_arguments);
|
cov_mark::hit!(too_many_arguments);
|
||||||
return None;
|
return None;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue