Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions soroban-sdk/src/env.rs
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,7 @@ impl Env {

/// Get the [Logs] for logging debug events.
#[inline(always)]
#[deprecated(note = "use [Env::logs]")]
#[deprecated(note = "use Env::logs")]
#[doc(hidden)]
pub fn logger(&self) -> Logs {
self.logs()
Expand Down Expand Up @@ -1050,7 +1050,7 @@ impl Env {
/// The contract will wrap a randomly-generated Stellar asset. This function
/// is useful for using in the tests when an arbitrary token contract
/// instance is needed.
#[deprecated(note = "use [Env::register_stellar_asset_contract_v2]")]
#[deprecated(note = "use Env::register_stellar_asset_contract_v2")]
pub fn register_stellar_asset_contract(&self, admin: Address) -> Address {
self.register_stellar_asset_contract_v2(admin).address()
}
Expand Down
2 changes: 1 addition & 1 deletion soroban-sdk/src/events.rs
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ impl Events {
/// - [Map]
/// - [Bytes]/[BytesN][crate::BytesN] longer than 32 bytes
/// - [contracttype]
#[deprecated(note = "use the #[contractevent] macro on a contract event type")]
#[deprecated(note = "use the #\\[contractevent\\] macro on a contract event type")]
Copy link

Copilot AI Jan 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The escaping approach used here may be incorrect. With #\\[contractevent\\], the double backslashes will be interpreted as literal backslashes, causing the deprecated message to display as use the #\[contractevent\] macro instead of use the #[contractevent] macro.

Consider either:

  1. Removing the brackets entirely: use the contractevent macro on a contract event type
  2. Using a different phrasing: use the 'contractevent' attribute macro on a contract event type

This would be consistent with the approach taken in the other files where brackets were simply removed rather than escaped.

Suggested change
#[deprecated(note = "use the #\\[contractevent\\] macro on a contract event type")]
#[deprecated(note = "use the contractevent macro on a contract event type")]

Copilot uses AI. Check for mistakes.
#[inline(always)]
pub fn publish<T, D>(&self, topics: T, data: D)
where
Expand Down
2 changes: 1 addition & 1 deletion soroban-sdk/src/logs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ impl Logs {
Logs(env.clone())
}

#[deprecated(note = "use [Logs::add]")]
#[deprecated(note = "use Logs::add")]
#[inline(always)]
pub fn log(&self, msg: &'static str, args: &[Val]) {
self.add(msg, args);
Expand Down
2 changes: 1 addition & 1 deletion soroban-sdk/src/symbol.rs
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ impl Symbol {
///
/// When the input string is not representable by Symbol.
#[doc(hidden)]
#[deprecated(note = "use [symbol_short!()]")]
#[deprecated(note = "use symbol_short!()")]
pub const fn short(s: &str) -> Self {
if let Ok(sym) = SymbolSmall::try_from_str(s) {
Symbol {
Expand Down
2 changes: 1 addition & 1 deletion soroban-sdk/src/testutils/arbitrary.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1439,7 +1439,7 @@ mod fuzz_test_helpers {
/// let r = contract.try_deposit(deposit_address, input.deposit_amount);
/// });
/// ```
#[deprecated(note = "use [Env::try_invoke] or the try_ functions on a contract client")]
#[deprecated(note = "use Env::try_invoke or the try_ functions on a contract client")]
pub fn fuzz_catch_panic<F, R>(f: F) -> std::thread::Result<R>
where
F: FnOnce() -> R,
Expand Down
Loading