Fix volatile warnings.

This commit is contained in:
Stephen Chung
2021-01-16 14:46:03 +08:00
parent e6c6ed759f
commit 65621b79b1
5 changed files with 24 additions and 22 deletions

View File

@@ -60,7 +60,7 @@ impl FnAccess {
/// _(INTERNALS)_ A type containing information on a scripted function.
/// Exported under the `internals` feature only.
///
/// # WARNING
/// # Volatile Data Structure
///
/// This type is volatile and may change.
#[derive(Debug, Clone)]
@@ -273,8 +273,10 @@ impl AST {
pub(crate) fn shared_lib(&self) -> Shared<Module> {
self.functions.clone()
}
/// Get the internal shared [`Module`] containing all script-defined functions.
/// _(INTERNALS)_ Get the internal shared [`Module`] containing all script-defined functions.
/// Exported under the `internals` feature only.
#[cfg(feature = "internals")]
#[deprecated = "this method is volatile and may change"]
#[cfg(not(feature = "no_module"))]
#[cfg(not(feature = "no_function"))]
#[inline(always)]
@@ -764,7 +766,7 @@ impl AsRef<Module> for AST {
/// _(INTERNALS)_ An identifier containing an [immutable string][ImmutableString] name and a [position][Position].
/// Exported under the `internals` feature only.
///
/// # WARNING
/// # Volatile Data Structure
///
/// This type is volatile and may change.
#[derive(Clone, Eq, PartialEq, Hash)]
@@ -785,7 +787,7 @@ impl fmt::Debug for Ident {
/// _(INTERNALS)_ A type encapsulating the mode of a `return`/`throw` statement.
/// Exported under the `internals` feature only.
///
/// # WARNING
/// # Volatile Data Structure
///
/// This type is volatile and may change.
#[derive(Debug, Eq, PartialEq, Clone, Copy, Hash)]
@@ -799,7 +801,7 @@ pub enum ReturnType {
/// _(INTERNALS)_ An [`AST`] node, consisting of either an [`Expr`] or a [`Stmt`].
/// Exported under the `internals` feature only.
///
/// # WARNING
/// # Volatile Data Structure
///
/// This type is volatile and may change.
#[derive(Debug, Clone, Hash)]
@@ -823,7 +825,7 @@ impl<'a> From<&'a Expr> for ASTNode<'a> {
/// _(INTERNALS)_ A statement.
/// Exported under the `internals` feature only.
///
/// # WARNING
/// # Volatile Data Structure
///
/// This type is volatile and may change.
#[derive(Debug, Clone, Hash)]
@@ -1070,7 +1072,7 @@ impl Stmt {
/// _(INTERNALS)_ A custom syntax expression.
/// Exported under the `internals` feature only.
///
/// # WARNING
/// # Volatile Data Structure
///
/// This type is volatile and may change.
#[derive(Debug, Clone, Hash)]
@@ -1086,7 +1088,7 @@ pub struct CustomExpr {
/// _(INTERNALS)_ A binary expression.
/// Exported under the `internals` feature only.
///
/// # WARNING
/// # Volatile Data Structure
///
/// This type is volatile and may change.
#[derive(Debug, Clone, Hash)]
@@ -1100,7 +1102,7 @@ pub struct BinaryExpr {
/// _(INTERNALS)_ A function call.
/// Exported under the `internals` feature only.
///
/// # WARNING
/// # Volatile Data Structure
///
/// This type is volatile and may change.
#[derive(Debug, Clone, Default, Hash)]
@@ -1195,7 +1197,7 @@ impl FloatWrapper {
/// _(INTERNALS)_ An expression sub-tree.
/// Exported under the `internals` feature only.
///
/// # WARNING
/// # Volatile Data Structure
///
/// This type is volatile and may change.
#[derive(Debug, Clone, Hash)]