Skip to content

Commit 9661b10

Browse files
hide all deprecated symbols (#675)
1 parent d0e7531 commit 9661b10

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

ic-cdk/src/api.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,19 @@ use std::{convert::TryFrom, num::NonZeroU64};
2525
since = "0.18.0",
2626
note = "The `api::call` module is deprecated. Individual items within this module have their own deprecation notices with specific migration guidance."
2727
)]
28+
#[doc(hidden)]
2829
pub mod call;
2930
#[deprecated(
3031
since = "0.18.0",
3132
note = "The `api::management_canister` module is deprecated. Please use the `management_canister` and `bitcoin_canister` modules at the crate root."
3233
)]
34+
#[doc(hidden)]
3335
pub mod management_canister;
3436
#[deprecated(
3537
since = "0.18.0",
3638
note = "The `api::stable` module has been moved to `stable` (crate root)."
3739
)]
40+
#[doc(hidden)]
3841
pub mod stable;
3942

4043
/// Gets the message argument data.
@@ -645,13 +648,15 @@ pub fn trap<T: AsRef<str>>(data: T) -> ! {
645648

646649
/// Prints the given message.
647650
#[deprecated(since = "0.18.0", note = "Use `debug_print` instead")]
651+
#[doc(hidden)]
648652
pub fn print<S: std::convert::AsRef<str>>(s: S) {
649653
let s = s.as_ref();
650654
ic0::debug_print(s.as_bytes());
651655
}
652656

653657
/// Returns the caller of the current call.
654658
#[deprecated(since = "0.18.0", note = "Use `msg_caller` instead")]
659+
#[doc(hidden)]
655660
pub fn caller() -> Principal {
656661
let len = ic0::msg_caller_size();
657662
let mut bytes = vec![0u8; len];
@@ -661,6 +666,7 @@ pub fn caller() -> Principal {
661666

662667
/// Returns the canister id as a blob.
663668
#[deprecated(since = "0.18.0", note = "Use `canister_self` instead")]
669+
#[doc(hidden)]
664670
pub fn id() -> Principal {
665671
let len = ic0::canister_self_size();
666672
let mut bytes = vec![0u8; len];
@@ -675,6 +681,7 @@ pub fn id() -> Principal {
675681
/// When the cycle balance is greater than `u64::MAX`, this function will panic.
676682
/// As this function is deprecated, it is recommended to use [`canister_cycle_balance`].
677683
#[deprecated(since = "0.18.0", note = "Use `canister_cycle_balance` instead")]
684+
#[doc(hidden)]
678685
pub fn canister_balance() -> u64 {
679686
// ic0 no longer provides `ic0.canister_cycle_balance` which returns a u64,
680687
// so we use the u128 version and convert it to u64.
@@ -686,6 +693,7 @@ pub fn canister_balance() -> u64 {
686693

687694
/// Gets the amount of funds available in the canister.
688695
#[deprecated(since = "0.18.0", note = "Use `canister_cycle_balance` instead")]
696+
#[doc(hidden)]
689697
pub fn canister_balance128() -> u128 {
690698
canister_cycle_balance()
691699
}
@@ -709,6 +717,7 @@ pub fn canister_balance128() -> u128 {
709717
/// - This function traps if it's called from an illegal context
710718
/// (e.g., from a query call).
711719
#[deprecated(since = "0.18.0", note = "Use `certified_data_set` instead")]
720+
#[doc(hidden)]
712721
pub fn set_certified_data(data: &[u8]) {
713722
ic0::certified_data_set(data);
714723
}
@@ -726,6 +735,7 @@ pub fn set_certified_data(data: &[u8]) {
726735
/// Passing zero as an argument to the function deactivates the timer and thus
727736
/// prevents the system from scheduling calls to the canister's `canister_global_timer` Wasm method.
728737
#[deprecated(since = "0.18.0", note = "Use `global_timer_set` instead")]
738+
#[doc(hidden)]
729739
pub fn set_global_timer(timestamp: u64) -> u64 {
730740
ic0::global_timer_set(timestamp)
731741
}

ic-cdk/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ use std::future::Future;
2626
#[doc(inline)]
2727
pub use api::trap;
2828

29-
#[doc(inline)]
29+
#[doc(hidden)]
3030
#[allow(deprecated)]
3131
pub use api::{
3232
call::{call, notify},

0 commit comments

Comments
 (0)