diff --git a/moveos/moveos-types/src/state_resolver.rs b/moveos/moveos-types/src/state_resolver.rs index 5c5fb1be9e..5ca8009702 100644 --- a/moveos/moveos-types/src/state_resolver.rs +++ b/moveos/moveos-types/src/state_resolver.rs @@ -347,7 +347,7 @@ pub trait StateReader: StateResolver { impl StateReader for R where R: StateResolver {} -pub trait AnnotatedStateReader: StateReader + MoveResolver where &Self: CompiledModuleView { +pub trait AnnotatedStateReader: StateReader + MoveResolver where for<'a> &'a Self: CompiledModuleView { fn get_annotated_states(&self, path: AccessPath) -> Result>> { let annotator = MoveValueAnnotator::new(self); self.get_states(path)? @@ -397,7 +397,7 @@ pub trait AnnotatedStateReader: StateReader + MoveResolver where &Self: Compiled } } -impl AnnotatedStateReader for T where T: StateReader + MoveResolver {} +impl AnnotatedStateReader for T where T: StateReader + MoveResolver, for<'a> &'a T: CompiledModuleView {} pub trait StateReaderExt: StateReader { fn get_account(&self, address: AccountAddress) -> Result>> {