Fix builds.
This commit is contained in:
parent
4e33bcfa0a
commit
ffc8a7f85c
@ -52,9 +52,6 @@ pub const FN_ANONYMOUS: &str = "anon$";
|
||||
/// function to compare two [`Dynamic`] values.
|
||||
pub const OP_EQUALS: &str = Token::EqualsTo.literal_syntax();
|
||||
|
||||
/// Standard not operator.
|
||||
pub const OP_NOT: &str = Token::Bang.literal_syntax();
|
||||
|
||||
/// Standard concatenation operator.
|
||||
///
|
||||
/// Used primarily to build up interpolated strings.
|
||||
|
@ -187,6 +187,7 @@ impl Engine {
|
||||
Target::RefMut(_) | Target::TempValue(_) => {
|
||||
*target.write_lock::<Dynamic>().unwrap() = new_val
|
||||
}
|
||||
#[allow(unreachable_patterns)]
|
||||
_ => **target = new_val,
|
||||
}
|
||||
}
|
||||
|
@ -8,7 +8,6 @@
|
||||
use super::call::FnCallArgs;
|
||||
use super::callable_function::CallableFunction;
|
||||
use super::native::{SendSync, Shared};
|
||||
use crate::engine::{FN_IDX_SET, FN_SET};
|
||||
use crate::types::dynamic::{DynamicWriteLock, Variant};
|
||||
use crate::{reify, Dynamic, NativeCallContext, RhaiResultOf};
|
||||
#[cfg(feature = "no_std")]
|
||||
@ -114,11 +113,11 @@ macro_rules! check_constant {
|
||||
|
||||
#[cfg(not(feature = "no_index"))]
|
||||
if $n == 3 && !deny {
|
||||
deny = $ctx.fn_name() == FN_IDX_SET && $args[0].is_read_only();
|
||||
deny = $ctx.fn_name() == crate::engine::FN_IDX_SET && $args[0].is_read_only();
|
||||
}
|
||||
#[cfg(not(feature = "no_object"))]
|
||||
if $n == 2 && !deny {
|
||||
deny = $ctx.fn_name().starts_with(FN_SET) && $args[0].is_read_only();
|
||||
deny = $ctx.fn_name().starts_with(crate::engine::FN_SET) && $args[0].is_read_only();
|
||||
}
|
||||
|
||||
if deny {
|
||||
|
@ -10,7 +10,7 @@ use crate::func::{
|
||||
use crate::types::{dynamic::Variant, BloomFilterU64, CustomTypesCollection};
|
||||
use crate::{
|
||||
calc_fn_hash, calc_fn_hash_full, Dynamic, FnArgsVec, Identifier, ImmutableString,
|
||||
NativeCallContext, RhaiResultOf, Shared, SharedModule, SmartString, StaticVec,
|
||||
NativeCallContext, RhaiResultOf, Shared, SharedModule, SmartString,
|
||||
};
|
||||
use bitflags::bitflags;
|
||||
#[cfg(feature = "no_std")]
|
||||
@ -2084,7 +2084,7 @@ impl Module {
|
||||
let mut module = Module::new();
|
||||
|
||||
// Extra modules left become sub-modules
|
||||
let mut imports = StaticVec::new_const();
|
||||
let mut imports = crate::StaticVec::new_const();
|
||||
|
||||
if result.is_ok() {
|
||||
global
|
||||
|
@ -4,9 +4,7 @@
|
||||
use crate::ast::{
|
||||
ASTFlags, Expr, OpAssignment, Stmt, StmtBlock, StmtBlockContainer, SwitchCasesCollection,
|
||||
};
|
||||
use crate::engine::{
|
||||
KEYWORD_DEBUG, KEYWORD_EVAL, KEYWORD_FN_PTR, KEYWORD_PRINT, KEYWORD_TYPE_OF, OP_NOT,
|
||||
};
|
||||
use crate::engine::{KEYWORD_DEBUG, KEYWORD_EVAL, KEYWORD_FN_PTR, KEYWORD_PRINT, KEYWORD_TYPE_OF};
|
||||
use crate::eval::{Caches, GlobalRuntimeState};
|
||||
use crate::func::builtin::get_builtin_binary_op_fn;
|
||||
use crate::func::hashing::get_hasher;
|
||||
@ -26,6 +24,9 @@ use std::{
|
||||
mem,
|
||||
};
|
||||
|
||||
/// Standard not operator.
|
||||
const OP_NOT: &str = Token::Bang.literal_syntax();
|
||||
|
||||
/// Level of optimization performed.
|
||||
#[derive(Debug, Eq, PartialEq, Hash, Clone, Copy)]
|
||||
#[non_exhaustive]
|
||||
|
Loading…
Reference in New Issue
Block a user