Remove ::solana_sdk hack (#11326)

Fixes #10933

Now that https://github.com/rust-lang/rust/pull/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.
This commit is contained in:
Aaron Hill 2020-08-18 13:59:41 -04:00 committed by GitHub
parent 55ce2ebd53
commit c099b29b36
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 5 deletions

View File

@ -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)(),
)
};
}