Fix builds.

This commit is contained in:
Stephen Chung 2022-04-18 23:24:08 +08:00
parent 60a933862e
commit f9ee0c29be
2 changed files with 7 additions and 8 deletions

View File

@ -63,9 +63,7 @@ impl Engine {
self.search_scope_only(scope, global, lib, this_ptr, expr, level) self.search_scope_only(scope, global, lib, this_ptr, expr, level)
} }
#[cfg(feature = "no_module")] #[cfg(feature = "no_module")]
(_, (), ..) => { (_, (), ..) => self.search_scope_only(scope, global, lib, this_ptr, expr, level),
self.search_scope_only(scope, global, caches, lib, this_ptr, expr, level)
}
// Qualified variable access // Qualified variable access
#[cfg(not(feature = "no_module"))] #[cfg(not(feature = "no_module"))]

View File

@ -5,9 +5,8 @@
use super::call::FnCallArgs; use super::call::FnCallArgs;
use super::callable_function::CallableFunction; use super::callable_function::CallableFunction;
use super::native::{FnAny, SendSync}; use super::native::{FnAny, SendSync};
use crate::tokenizer::Position;
use crate::types::dynamic::{DynamicWriteLock, Variant}; use crate::types::dynamic::{DynamicWriteLock, Variant};
use crate::{reify, Dynamic, NativeCallContext, RhaiResultOf, ERR}; use crate::{reify, Dynamic, NativeCallContext, RhaiResultOf};
#[cfg(feature = "no_std")] #[cfg(feature = "no_std")]
use std::prelude::v1::*; use std::prelude::v1::*;
use std::{any::TypeId, mem}; use std::{any::TypeId, mem};
@ -102,9 +101,11 @@ macro_rules! check_constant {
_ => false, _ => false,
}; };
if deny { if deny {
return Err( return Err(crate::ERR::ErrorAssignmentToConstant(
ERR::ErrorAssignmentToConstant(String::new(), Position::NONE).into(), String::new(),
); crate::Position::NONE,
)
.into());
} }
} }
} }