nonminimal_bool

This commit is contained in:
Johann Hemmann 2024-01-19 15:47:11 +01:00
parent e58b683201
commit e6f9f4c0e4
3 changed files with 2 additions and 3 deletions

View file

@ -177,7 +177,6 @@ format_collect = "allow"
large_enum_variant = "allow"
needless_doctest_main = "allow"
new_without_default = "allow"
nonminimal_bool = "allow"
non_canonical_clone_impl = "allow"
non_canonical_partial_ord_impl = "allow"
non_minimal_cfg = "allow"

View file

@ -100,7 +100,7 @@ fn validate_type_recursively(
}
(_, Some(ty)) => match ty.as_builtin() {
// `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,

View file

@ -23,7 +23,7 @@ impl ActiveParameter {
let idx = active_parameter?;
let mut params = signature.params(sema.db);
if !(idx < params.len()) {
if idx >= params.len() {
cov_mark::hit!(too_many_arguments);
return None;
}