diff --git a/compiler/can/src/def.rs b/compiler/can/src/def.rs index d3773a4108..d17e51ecec 100644 --- a/compiler/can/src/def.rs +++ b/compiler/can/src/def.rs @@ -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, abilities: MutMap, &[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); } diff --git a/reporting/tests/test_reporting.rs b/reporting/tests/test_reporting.rs index 4a091caa06..ca0517e652 100644 --- a/reporting/tests/test_reporting.rs +++ b/reporting/tests/test_reporting.rs @@ -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. "# ), )