Add deprecated packages API.

This commit is contained in:
Stephen Chung
2020-12-23 15:30:35 +08:00
parent 746a0b186f
commit 08e7ad8c09
4 changed files with 42 additions and 7 deletions

View File

@@ -228,7 +228,7 @@ impl AST {
/// _(INTERNALS)_ Get the statements.
/// Exported under the `internals` feature only.
#[cfg(feature = "internals")]
#[deprecated(note = "this method is volatile and may change")]
#[deprecated = "this method is volatile and may change"]
#[inline(always)]
pub fn statements(&self) -> &[Stmt] {
&self.statements
@@ -255,7 +255,7 @@ impl AST {
/// _(INTERNALS)_ Get the internal [`Module`] containing all script-defined functions.
/// Exported under the `internals` feature only.
#[cfg(feature = "internals")]
#[deprecated(note = "this method is volatile and may change")]
#[deprecated = "this method is volatile and may change"]
#[inline(always)]
pub fn lib(&self) -> &Module {
&self.functions