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 18, 2020
1 parent 9e89a96 commit 0ee7e2a
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!($filename).to_string(),
::solana_sdk::respan!($crate::$id, $name)(),
$crate::respan!($crate::$id, $name)(),
)
};
}
Expand Down

0 comments on commit 0ee7e2a

Please sign in to comment.