Fix no_optimize build.

This commit is contained in:
Stephen Chung 2020-11-16 23:32:44 +08:00
parent 7ef3bd6b20
commit 999a87f86e
4 changed files with 10 additions and 7 deletions

View File

@ -5,6 +5,7 @@ use crate::dynamic::{map_std_type_name, Union, Variant};
use crate::fn_call::run_builtin_op_assignment; use crate::fn_call::run_builtin_op_assignment;
use crate::fn_native::{CallableFunction, Callback, IteratorFn, OnVarCallback}; use crate::fn_native::{CallableFunction, Callback, IteratorFn, OnVarCallback};
use crate::module::NamespaceRef; use crate::module::NamespaceRef;
use crate::optimize::OptimizationLevel;
use crate::packages::{Package, PackagesCollection, StandardPackage}; use crate::packages::{Package, PackagesCollection, StandardPackage};
use crate::r#unsafe::unsafe_cast_var_name_to_lifetime; use crate::r#unsafe::unsafe_cast_var_name_to_lifetime;
use crate::scope::EntryType as ScopeEntryType; use crate::scope::EntryType as ScopeEntryType;
@ -23,8 +24,8 @@ use crate::stdlib::{
use crate::syntax::CustomSyntax; use crate::syntax::CustomSyntax;
use crate::utils::get_hasher; use crate::utils::get_hasher;
use crate::{ use crate::{
calc_native_fn_hash, Dynamic, EvalAltResult, FnPtr, ImmutableString, Module, OptimizationLevel, calc_native_fn_hash, Dynamic, EvalAltResult, FnPtr, ImmutableString, Module, Position, Scope,
Position, Scope, Shared, StaticVec, NO_POS, Shared, StaticVec, NO_POS,
}; };
#[cfg(not(feature = "no_index"))] #[cfg(not(feature = "no_index"))]

View File

@ -3,6 +3,7 @@
use crate::dynamic::Variant; use crate::dynamic::Variant;
use crate::engine::{EvalContext, Imports}; use crate::engine::{EvalContext, Imports};
use crate::fn_native::{FnCallArgs, SendSync}; use crate::fn_native::{FnCallArgs, SendSync};
use crate::optimize::OptimizationLevel;
use crate::stdlib::{ use crate::stdlib::{
any::{type_name, TypeId}, any::{type_name, TypeId},
boxed::Box, boxed::Box,
@ -11,8 +12,7 @@ use crate::stdlib::{
}; };
use crate::utils::get_hasher; use crate::utils::get_hasher;
use crate::{ use crate::{
scope::Scope, Dynamic, Engine, EvalAltResult, NativeCallContext, OptimizationLevel, ParseError, scope::Scope, Dynamic, Engine, EvalAltResult, NativeCallContext, ParseError, AST, NO_POS,
AST, NO_POS,
}; };
#[cfg(not(feature = "no_index"))] #[cfg(not(feature = "no_index"))]

View File

@ -8,6 +8,7 @@ use crate::engine::{
}; };
use crate::fn_native::FnCallArgs; use crate::fn_native::FnCallArgs;
use crate::module::NamespaceRef; use crate::module::NamespaceRef;
use crate::optimize::OptimizationLevel;
use crate::scope::EntryType as ScopeEntryType; use crate::scope::EntryType as ScopeEntryType;
use crate::stdlib::{ use crate::stdlib::{
any::{type_name, TypeId}, any::{type_name, TypeId},
@ -22,7 +23,7 @@ use crate::stdlib::{
}; };
use crate::{ use crate::{
calc_native_fn_hash, calc_script_fn_hash, Dynamic, Engine, EvalAltResult, FnPtr, calc_native_fn_hash, calc_script_fn_hash, Dynamic, Engine, EvalAltResult, FnPtr,
ImmutableString, Module, OptimizationLevel, ParseErrorType, Scope, StaticVec, INT, NO_POS, ImmutableString, Module, ParseErrorType, Scope, StaticVec, INT, NO_POS,
}; };
#[cfg(not(feature = "no_float"))] #[cfg(not(feature = "no_float"))]

View File

@ -7,6 +7,7 @@ use crate::dynamic::Union;
use crate::engine::{KEYWORD_THIS, MARKER_BLOCK, MARKER_EXPR, MARKER_IDENT}; use crate::engine::{KEYWORD_THIS, MARKER_BLOCK, MARKER_EXPR, MARKER_IDENT};
use crate::module::NamespaceRef; use crate::module::NamespaceRef;
use crate::optimize::optimize_into_ast; use crate::optimize::optimize_into_ast;
use crate::optimize::OptimizationLevel;
use crate::scope::EntryType as ScopeEntryType; use crate::scope::EntryType as ScopeEntryType;
use crate::stdlib::{ use crate::stdlib::{
borrow::Cow, borrow::Cow,
@ -24,8 +25,8 @@ use crate::syntax::CustomSyntax;
use crate::token::{is_keyword_function, is_valid_identifier, Token, TokenStream}; use crate::token::{is_keyword_function, is_valid_identifier, Token, TokenStream};
use crate::utils::{get_hasher, StraightHasherBuilder}; use crate::utils::{get_hasher, StraightHasherBuilder};
use crate::{ use crate::{
calc_script_fn_hash, Dynamic, Engine, ImmutableString, LexError, OptimizationLevel, ParseError, calc_script_fn_hash, Dynamic, Engine, ImmutableString, LexError, ParseError, ParseErrorType,
ParseErrorType, Position, Scope, StaticVec, AST, NO_POS, Position, Scope, StaticVec, AST, NO_POS,
}; };
#[cfg(not(feature = "no_float"))] #[cfg(not(feature = "no_float"))]