diff --git a/src/api/compile.rs b/src/api/compile.rs index 5ed08043..f089e7ed 100644 --- a/src/api/compile.rs +++ b/src/api/compile.rs @@ -322,7 +322,7 @@ impl Engine { /// The JSON string must be an object hash. It cannot be a simple scalar value. /// /// Set `has_null` to `true` in order to map `null` values to `()`. - /// Setting it to `false` will cause an [`ErrorVariableNotFound`][EvalAltResult::ErrorVariableNotFound] error during parsing. + /// Setting it to `false` will cause an [`ErrorVariableNotFound`][crate::EvalAltResult::ErrorVariableNotFound] error during parsing. /// /// # JSON With Sub-Objects /// diff --git a/src/api/deprecated.rs b/src/api/deprecated.rs index 773e18aa..1ad4fd9b 100644 --- a/src/api/deprecated.rs +++ b/src/api/deprecated.rs @@ -256,23 +256,3 @@ impl From for Result> { Err(err.into()) } } - -impl AST { - /// _(internals)_ Get the internal [`Module`] containing all script-defined functions. - /// Exported under the `internals` feature only. - /// - /// Not available under `no_function`. - /// - /// # Deprecated - /// - /// This method is deprecated. Use [`shared_lib`][AST::shared_lib] instead. - /// - /// This method will be removed in the next major version. - #[deprecated(since = "1.3.0", note = "use `shared_lib` instead")] - #[cfg(feature = "internals")] - #[inline(always)] - #[must_use] - pub fn lib(&self) -> &Module { - &self.functions - } -} diff --git a/src/api/limits.rs b/src/api/limits.rs index 6b099824..af512494 100644 --- a/src/api/limits.rs +++ b/src/api/limits.rs @@ -29,21 +29,21 @@ pub struct Limits { pub max_function_expr_depth: Option, /// Maximum number of operations allowed to run. pub max_operations: Option, - /// Maximum number of [modules][Module] allowed to load. + /// Maximum number of [modules][crate::Module] allowed to load. /// - /// Set to zero to effectively disable loading any [module][Module]. + /// Set to zero to effectively disable loading any [module][crate::Module]. /// /// Not available under `no_module`. #[cfg(not(feature = "no_module"))] pub max_modules: usize, - /// Maximum length of a [string][ImmutableString]. + /// Maximum length of a [string][crate::ImmutableString]. pub max_string_size: Option, - /// Maximum length of an [array][Array]. + /// Maximum length of an [array][crate::Array]. /// /// Not available under `no_index`. #[cfg(not(feature = "no_index"))] pub max_array_size: Option, - /// Maximum number of properties in an [object map][Map]. + /// Maximum number of properties in an [object map][crate::Map]. /// /// Not available under `no_object`. #[cfg(not(feature = "no_object"))] diff --git a/src/ast.rs b/src/ast.rs index f3fff209..b9a2852a 100644 --- a/src/ast.rs +++ b/src/ast.rs @@ -2442,3 +2442,23 @@ impl Expr { true } } + +impl AST { + /// _(internals)_ Get the internal [`Module`] containing all script-defined functions. + /// Exported under the `internals` feature only. + /// + /// Not available under `no_function`. + /// + /// # Deprecated + /// + /// This method is deprecated. Use [`shared_lib`][AST::shared_lib] instead. + /// + /// This method will be removed in the next major version. + #[deprecated(since = "1.3.0", note = "use `shared_lib` instead")] + #[cfg(feature = "internals")] + #[inline(always)] + #[must_use] + pub fn lib(&self) -> &crate::Module { + &self.functions + } +} diff --git a/src/lib.rs b/src/lib.rs index 61183600..41514a52 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -216,7 +216,7 @@ pub use engine::{EvalState, FnResolutionCache, FnResolutionCacheEntry, Imports}; #[cfg(feature = "internals")] #[cfg(not(feature = "unchecked"))] -pub use engine::Limits; +pub use api::limits::Limits; #[cfg(feature = "internals")] pub use module::NamespaceRef; diff --git a/src/tokenizer.rs b/src/tokenizer.rs index 46d75684..f96bf579 100644 --- a/src/tokenizer.rs +++ b/src/tokenizer.rs @@ -2241,7 +2241,7 @@ impl Engine { #[must_use] pub fn lex<'a>( &'a self, - input: impl IntoIterator + 'a)>, + input: impl IntoIterator + 'a)>, ) -> (TokenIterator<'a>, TokenizerControl) { self.lex_raw(input, None) } @@ -2252,7 +2252,7 @@ impl Engine { #[must_use] pub fn lex_with_map<'a>( &'a self, - input: impl IntoIterator + 'a)>, + input: impl IntoIterator + 'a)>, token_mapper: &'a OnParseTokenCallback, ) -> (TokenIterator<'a>, TokenizerControl) { self.lex_raw(input, Some(token_mapper))