Fix internals build.
This commit is contained in:
parent
bfe9ac2188
commit
1513e6ab6a
@ -280,8 +280,9 @@ impl AST {
|
||||
}
|
||||
/// Get the embedded [module resolver][`ModuleResolver`].
|
||||
#[cfg(not(feature = "no_module"))]
|
||||
#[cfg(not(feature = "internals"))]
|
||||
#[inline(always)]
|
||||
pub(crate) fn shared_resolver(
|
||||
pub(crate) fn resolver(
|
||||
&self,
|
||||
) -> Option<Shared<crate::module::resolvers::StaticModuleResolver>> {
|
||||
self.resolver.clone()
|
||||
@ -291,8 +292,8 @@ impl AST {
|
||||
#[cfg(not(feature = "no_module"))]
|
||||
#[cfg(feature = "internals")]
|
||||
#[inline(always)]
|
||||
pub fn resolver(&self) -> Option<&dyn crate::ModuleResolver> {
|
||||
self.resolver.map(|r| &*r)
|
||||
pub fn resolver(&self) -> Option<Shared<crate::module::resolvers::StaticModuleResolver>> {
|
||||
self.resolver.clone()
|
||||
}
|
||||
/// Set the embedded [module resolver][`ModuleResolver`].
|
||||
#[cfg(not(feature = "no_module"))]
|
||||
|
@ -1520,7 +1520,7 @@ impl Engine {
|
||||
let state = &mut State {
|
||||
source: ast.clone_source(),
|
||||
#[cfg(not(feature = "no_module"))]
|
||||
resolver: ast.shared_resolver(),
|
||||
resolver: ast.resolver(),
|
||||
..Default::default()
|
||||
};
|
||||
self.eval_statements_raw(scope, mods, state, ast.statements(), &[ast.lib()], level)
|
||||
@ -1589,7 +1589,7 @@ impl Engine {
|
||||
let state = &mut State {
|
||||
source: ast.clone_source(),
|
||||
#[cfg(not(feature = "no_module"))]
|
||||
resolver: ast.shared_resolver(),
|
||||
resolver: ast.resolver(),
|
||||
..Default::default()
|
||||
};
|
||||
self.eval_statements_raw(scope, mods, state, ast.statements(), &[ast.lib()], 0)?;
|
||||
|
Loading…
Reference in New Issue
Block a user