-
Notifications
You must be signed in to change notification settings - Fork 173
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hide internal macros from public interface #755
Conversation
@@ -11,19 +10,19 @@ macro_rules! cfg_feature { | |||
|
|||
macro_rules! cfg_client { | |||
($($item:item)*) => { | |||
$crate::cfg_feature!("client", $($item)*); | |||
cfg_feature!("client", $($item)*); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wasn't sure without trying, but things seem to work fine without properly namespacing the macro!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, here be dragons. I think there are situations when this will not work well, but can't remember what the full story was. $crate::macros::cfg_feature!
should work though right?
@@ -1,4 +1,3 @@ | |||
#[macro_export] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's this macro_export which makes the macro part of the public interface I believe.
@@ -11,19 +10,19 @@ macro_rules! cfg_feature { | |||
|
|||
macro_rules! cfg_client { | |||
($($item:item)*) => { | |||
$crate::cfg_feature!("client", $($item)*); | |||
cfg_feature!("client", $($item)*); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, here be dragons. I think there are situations when this will not work well, but can't remember what the full story was. $crate::macros::cfg_feature!
should work though right?
should be alright because they are internal anyway, so if it works in the CI that should be sufficent |
Great James, I looked at the generated docs and looks good :) |
The title says it all :)