From 70cb4795bad54408e874ee6d90b248a39e7cb9db Mon Sep 17 00:00:00 2001 From: Brendan Hansknecht Date: Tue, 28 Nov 2023 10:05:25 -0800 Subject: [PATCH] use INSPECT_INSPECT_ABILITY instead of INSPECT_INSPECT --- crates/compiler/load/tests/test_reporting.rs | 2 +- crates/compiler/module/src/symbol.rs | 5 ++++- crates/compiler/solve/src/ability.rs | 2 +- crates/compiler/types/src/subs.rs | 2 +- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/crates/compiler/load/tests/test_reporting.rs b/crates/compiler/load/tests/test_reporting.rs index 4ff92306428..2a8fb4bcb8c 100644 --- a/crates/compiler/load/tests/test_reporting.rs +++ b/crates/compiler/load/tests/test_reporting.rs @@ -9744,7 +9744,7 @@ In roc, functions are always written as a lambda, like{} Only builtin abilities can be derived. - Note: The builtin abilities are `Encoding`, `Decoding`, `Hash`, `Eq` + Note: The builtin abilities are `Encoding`, `Decoding`, `Hash`, `Eq`, `Inspect` "### ); diff --git a/crates/compiler/module/src/symbol.rs b/crates/compiler/module/src/symbol.rs index bbd130d3269..7fee728ad40 100644 --- a/crates/compiler/module/src/symbol.rs +++ b/crates/compiler/module/src/symbol.rs @@ -53,7 +53,10 @@ pub const DERIVABLE_ABILITIES: &[(Symbol, &[Symbol])] = &[ (Symbol::DECODE_DECODING, &[Symbol::DECODE_DECODER]), (Symbol::HASH_HASH_ABILITY, &[Symbol::HASH_HASH]), (Symbol::BOOL_EQ, &[Symbol::BOOL_IS_EQ]), - (Symbol::INSPECT_INSPECT, &[Symbol::INSPECT_TO_INSPECTOR]), + ( + Symbol::INSPECT_INSPECT_ABILITY, + &[Symbol::INSPECT_TO_INSPECTOR], + ), ]; /// In Debug builds only, Symbol has a name() method that lets diff --git a/crates/compiler/solve/src/ability.rs b/crates/compiler/solve/src/ability.rs index 36eac7736ae..33de269a9f8 100644 --- a/crates/compiler/solve/src/ability.rs +++ b/crates/compiler/solve/src/ability.rs @@ -854,7 +854,7 @@ trait DerivableVisitor { struct DeriveInspect; impl DerivableVisitor for DeriveInspect { - const ABILITY: Symbol = Symbol::INSPECT_INSPECT; + const ABILITY: Symbol = Symbol::INSPECT_INSPECT_ABILITY; const ABILITY_SLICE: SubsSlice = Subs::AB_INSPECT; #[inline(always)] diff --git a/crates/compiler/types/src/subs.rs b/crates/compiler/types/src/subs.rs index 07dda6b003b..7b3f6abf288 100644 --- a/crates/compiler/types/src/subs.rs +++ b/crates/compiler/types/src/subs.rs @@ -1756,7 +1756,7 @@ impl Subs { symbol_names.push(Symbol::HASH_HASHER); symbol_names.push(Symbol::HASH_HASH_ABILITY); symbol_names.push(Symbol::BOOL_EQ); - symbol_names.push(Symbol::INSPECT_INSPECT); + symbol_names.push(Symbol::INSPECT_INSPECT_ABILITY); // END INIT-SymbolNames // IFTTT INIT-VariableSubsSlice