Skip to content

Commit

Permalink
Remove ::solana_sdk hack
Browse files Browse the repository at this point in the history
Fixes solana-labs#10933

Now that rust-lang/rust#72121 has been merged,
using a `$crate` path from a nested `macro_rules!` will work properly
across multiple crates. This allows us to stop using `::solana_sdk`
to reference to the `respan!` macro.
  • Loading branch information
Aaron1011 committed Aug 4, 2020
1 parent 1d40685 commit 3a8af68
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions sdk/src/entrypoint_native.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,16 +58,12 @@ macro_rules! declare_name {
// `declare_name(foo)`
//
// See the `respan!` macro for more details.
// This should use `crate::respan!` once
// https://github.com/rust-lang/rust/pull/72121 is merged:
// see https://github.com/solana-labs/solana/issues/10933.
// For now, we need to use `::solana_sdk`
//
// `respan!` respans the path `$crate::id`, which we then call (hence the extra
// parens)
(
stringify!($name).to_string(),
::solana_sdk::respan!($crate::id, $name)(),
$crate::respan!($crate::id, $name)(),
)
};
}
Expand Down

0 comments on commit 3a8af68

Please sign in to comment.