1.65 clippy fixes

This commit is contained in:
Folkert 2022-11-03 16:20:37 +01:00
parent f0d6e418fa
commit 66a1ba00eb
No known key found for this signature in database
GPG key ID: 1F17F6FFD112B97C
53 changed files with 224 additions and 225 deletions

View file

@ -28,7 +28,7 @@ pub struct MemberVariables {
/// The member and its signature is defined locally, in the module the store is created for.
/// We need to instantiate and introduce this during solving.
#[derive(Debug, Clone, PartialEq)]
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct ResolvedMemberType(Variable);
/// Member type information that needs to be resolved from imports.
@ -56,7 +56,7 @@ impl ResolvePhase for Pending {
type MemberType = PendingMemberType;
}
#[derive(Default, Debug, Clone, Copy, PartialEq)]
#[derive(Default, Debug, Clone, Copy, PartialEq, Eq)]
pub struct Resolved;
impl ResolvePhase for Resolved {
type MemberType = ResolvedMemberType;

View file

@ -1821,7 +1821,7 @@ pub(crate) fn sort_can_defs(
.strongly_connected_components_subset(group);
debug_assert!(
!group.iter_ones().any(|index| matches!((&defs[index]).as_ref().unwrap().loc_pattern.value, Pattern::AbilityMemberSpecialization{..})),
!group.iter_ones().any(|index| matches!(defs[index].as_ref().unwrap().loc_pattern.value, Pattern::AbilityMemberSpecialization{..})),
"A specialization is involved in a recursive cycle - this should not be knowable until solving");
let declaration = if direct_sccs.groups().count() == 1 {

View file

@ -65,7 +65,7 @@ impl Output {
}
}
#[derive(Clone, Debug, PartialEq, Copy)]
#[derive(Clone, Debug, PartialEq, Eq, Copy)]
pub enum IntValue {
I128([u8; 16]),
U128([u8; 16]),
@ -345,7 +345,7 @@ pub struct ClosureData {
///
/// We distinguish them from closures so we can have better error messages
/// during constraint generation.
#[derive(Clone, Debug, PartialEq)]
#[derive(Clone, Debug, PartialEq, Eq)]
pub struct AccessorData {
pub name: Symbol,
pub function_var: Variable,
@ -485,7 +485,7 @@ pub struct Field {
pub loc_expr: Box<Loc<Expr>>,
}
#[derive(Clone, Copy, Debug, PartialEq)]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum Recursive {
NotRecursive = 0,
Recursive = 1,
@ -888,7 +888,7 @@ pub fn canonicalize_expr<'a>(
var_store,
inner_scope,
region,
*branch,
branch,
&mut output,
)
});
@ -2737,7 +2737,7 @@ fn get_lookup_symbols(expr: &Expr) -> Vec<ExpectLookup> {
| Expr::ExpectFx {
loc_continuation, ..
} => {
stack.push(&(*loc_continuation).value);
stack.push(&loc_continuation.value);
// Intentionally ignore the lookups in the nested `expect` condition itself,
// because they couldn't possibly influence the outcome of this `expect`!

View file

@ -79,7 +79,7 @@ fn desugar_value_def<'a>(arena: &'a Bump, def: &'a ValueDef<'a>) -> ValueDef<'a>
ann_pattern,
ann_type,
comment: *comment,
body_pattern: *body_pattern,
body_pattern,
body_expr: desugar_expr(arena, body_expr),
},
Expect {