stop reporting unused ability members

This commit is contained in:
Folkert 2022-04-25 20:45:38 +02:00
parent 53c8dee4ed
commit a0d688bfb7
No known key found for this signature in database
GPG key ID: 1F17F6FFD112B97C
2 changed files with 0 additions and 54 deletions

View file

@ -452,7 +452,6 @@ pub(crate) fn canonicalize_defs<'a>(
&mut output,
var_store,
&mut scope,
&mut symbols_introduced,
abilities,
&abilities_in_scope,
pattern_type,
@ -554,7 +553,6 @@ fn resolve_abilities<'a>(
output: &mut Output,
var_store: &mut VarStore,
scope: &mut Scope,
symbols_introduced: &mut MutMap<Symbol, Region>,
abilities: MutMap<Symbol, (Loc<Symbol>, &[AbilityMember])>,
abilities_in_scope: &[Symbol],
pattern_type: PatternType,
@ -598,8 +596,6 @@ fn resolve_abilities<'a>(
}
};
symbols_introduced.insert(member_sym, name_region);
if pattern_type == PatternType::TopLevelDef {
env.top_level_symbols.insert(member_sym);
}

View file

@ -9305,16 +9305,6 @@ I need all branches in an `if` to have the same type!
| a has Ability
at the end of the type.
UNUSED DEFINITION /code/proj/Main.roc
`ab` is not used anywhere in your code.
3 Ability has ab : a -> {} | a has Ability
^^
If you didn't intend on using `ab` then remove it so future readers of
your code don't wonder why it is there.
"#
),
)
@ -9391,16 +9381,6 @@ I need all branches in an `if` to have the same type!
If you didn't intend on using `Ability` then remove it so future readers
of your code don't wonder why it is there.
UNUSED DEFINITION /code/proj/Main.roc
`ab` is not used anywhere in your code.
3 Ability has ab : {} -> {}
^^
If you didn't intend on using `ab` then remove it so future readers of
your code don't wonder why it is there.
"#
),
)
@ -9432,16 +9412,6 @@ I need all branches in an `if` to have the same type!
are a part of.
Hint: Did you mean to bind the `Hash` ability instead?
UNUSED DEFINITION /code/proj/Main.roc
`hash` is not used anywhere in your code.
4 Hash has hash : a, b -> Num.U64 | a has Eq, b has Hash
^^^^
If you didn't intend on using `hash` then remove it so future readers of
your code don't wonder why it is there.
"#
),
)
@ -9473,16 +9443,6 @@ I need all branches in an `if` to have the same type!
looking at specializations!
Hint: Did you mean to only bind `a` to `Eq`?
UNUSED DEFINITION /code/proj/Main.roc
`eq` is not used anywhere in your code.
3 Eq has eq : a, b -> Bool.Bool | a has Eq, b has Eq
^^
If you didn't intend on using `eq` then remove it so future readers of
your code don't wonder why it is there.
"#
),
)
@ -9526,16 +9486,6 @@ I need all branches in an `if` to have the same type!
a has Hash
Otherwise, the function does not need to be part of the ability!
UNUSED DEFINITION /code/proj/Main.roc
`hash` is not used anywhere in your code.
3 Hash has hash : (a | a has Hash) -> Num.U64
^^^^
If you didn't intend on using `hash` then remove it so future readers of
your code don't wonder why it is there.
"#
),
)