diff --git a/src/eval/eval_context.rs b/src/eval/eval_context.rs index 346242de..fd2a9c78 100644 --- a/src/eval/eval_context.rs +++ b/src/eval/eval_context.rs @@ -52,7 +52,8 @@ impl<'x, 'px, 'm, 'pm, 'pt> EvalContext<'_, 'x, 'px, 'm, 'pm, '_, '_, '_, '_, 'p pub fn scope_mut(&mut self) -> &mut &'x mut Scope<'px> { &mut self.scope } - /// Get an iterator over the current set of modules imported via `import` statements. + /// Get an iterator over the current set of modules imported via `import` statements, + /// in reverse order (i.e. modules imported last come first). #[cfg(not(feature = "no_module"))] #[inline(always)] pub fn iter_imports(&self) -> impl Iterator { diff --git a/src/eval/global_state.rs b/src/eval/global_state.rs index 241f6d16..2c06b88f 100644 --- a/src/eval/global_state.rs +++ b/src/eval/global_state.rs @@ -147,7 +147,7 @@ impl GlobalRuntimeState<'_> { /// Get an iterator to the stack of globally-imported [modules][Module] in forward order. #[allow(dead_code)] #[inline] - pub(crate) fn scan_imports_raw(&self) -> impl Iterator)> { + pub fn scan_imports_raw(&self) -> impl Iterator)> { self.keys.iter().zip(self.modules.iter()) } /// Does the specified function hash key exist in the stack of globally-imported [modules][Module]?