mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-27 05:49:08 +00:00
Remove unused variables
This commit is contained in:
parent
753d12e912
commit
ae4916ceb7
1 changed files with 3 additions and 16 deletions
|
@ -114,7 +114,6 @@ pub struct ObligationCache {
|
||||||
|
|
||||||
enum ReadCache {
|
enum ReadCache {
|
||||||
Impl,
|
Impl,
|
||||||
Derive,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pub struct CheckedDerives {
|
pub struct CheckedDerives {
|
||||||
|
@ -253,7 +252,7 @@ impl ObligationCache {
|
||||||
match typ {
|
match typ {
|
||||||
Obligated::Adhoc(var) => self.check_adhoc(subs, abilities_store, var, ability),
|
Obligated::Adhoc(var) => self.check_adhoc(subs, abilities_store, var, ability),
|
||||||
Obligated::Opaque(opaque) => self
|
Obligated::Opaque(opaque) => self
|
||||||
.check_opaque_and_read(subs, abilities_store, opaque, ability)
|
.check_opaque_and_read(abilities_store, opaque, ability)
|
||||||
.clone(),
|
.clone(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -315,13 +314,11 @@ impl ObligationCache {
|
||||||
|
|
||||||
fn check_opaque(
|
fn check_opaque(
|
||||||
&mut self,
|
&mut self,
|
||||||
subs: &mut Subs,
|
|
||||||
abilities_store: &AbilitiesStore,
|
abilities_store: &AbilitiesStore,
|
||||||
opaque: Symbol,
|
opaque: Symbol,
|
||||||
ability: Symbol,
|
ability: Symbol,
|
||||||
) -> ReadCache {
|
) -> ReadCache {
|
||||||
let impl_key = ImplKey { opaque, ability };
|
let impl_key = ImplKey { opaque, ability };
|
||||||
let derive_key = RequestedDeriveKey { opaque, ability };
|
|
||||||
|
|
||||||
self.check_impl(abilities_store, impl_key);
|
self.check_impl(abilities_store, impl_key);
|
||||||
ReadCache::Impl
|
ReadCache::Impl
|
||||||
|
@ -329,17 +326,12 @@ impl ObligationCache {
|
||||||
|
|
||||||
fn check_opaque_and_read(
|
fn check_opaque_and_read(
|
||||||
&mut self,
|
&mut self,
|
||||||
subs: &mut Subs,
|
|
||||||
abilities_store: &AbilitiesStore,
|
abilities_store: &AbilitiesStore,
|
||||||
opaque: Symbol,
|
opaque: Symbol,
|
||||||
ability: Symbol,
|
ability: Symbol,
|
||||||
) -> &ObligationResult {
|
) -> &ObligationResult {
|
||||||
match self.check_opaque(subs, abilities_store, opaque, ability) {
|
match self.check_opaque(abilities_store, opaque, ability) {
|
||||||
ReadCache::Impl => self.impl_cache.get(&ImplKey { opaque, ability }).unwrap(),
|
ReadCache::Impl => self.impl_cache.get(&ImplKey { opaque, ability }).unwrap(),
|
||||||
ReadCache::Derive => self
|
|
||||||
.derive_cache
|
|
||||||
.get(&RequestedDeriveKey { opaque, ability })
|
|
||||||
.unwrap(),
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -534,12 +526,7 @@ impl ObligationCache {
|
||||||
Alias(name, _, _, AliasKind::Opaque) => {
|
Alias(name, _, _, AliasKind::Opaque) => {
|
||||||
let opaque = *name;
|
let opaque = *name;
|
||||||
if self
|
if self
|
||||||
.check_opaque_and_read(
|
.check_opaque_and_read(abilities_store, opaque, Symbol::ENCODE_ENCODING)
|
||||||
subs,
|
|
||||||
abilities_store,
|
|
||||||
opaque,
|
|
||||||
Symbol::ENCODE_ENCODING,
|
|
||||||
)
|
|
||||||
.is_err()
|
.is_err()
|
||||||
{
|
{
|
||||||
return Err(var);
|
return Err(var);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue