-
-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
1 parent
3038ad7
commit 182d53f
Showing
7 changed files
with
188 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
[package] | ||
name = "reexport_declarative_macro" | ||
version = "0.1.0" | ||
edition = "2021" | ||
|
||
[dependencies] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
//! This crate exports the following macros: | ||
//! - `top_level_exported`, at top level only | ||
//! - `private_mod_exported`, at top level only | ||
//! - `top_level_reexported`, at top level, and inside | ||
//! the `macros`, `reexports`, and `glob_reexports` modules | ||
//! - `private_mod_reexported`, at top level, and inside | ||
//! the `macros`, `reexports`, and `glob_reexports` modules | ||
//! | ||
//! The `top_level_not_exported` and `private_mod_not_exported` macros are not exported. | ||
#![allow(unused_macros)] | ||
|
||
macro_rules! top_level_not_exported { | ||
() => {} | ||
} | ||
|
||
#[macro_export] | ||
macro_rules! top_level_exported { | ||
() => {} | ||
} | ||
|
||
#[macro_export] | ||
macro_rules! top_level_reexported { | ||
() => {} | ||
} | ||
|
||
mod private { | ||
#[macro_export] | ||
macro_rules! private_mod_exported { | ||
() => {} | ||
} | ||
|
||
macro_rules! private_mod_not_exported { | ||
() => {} | ||
} | ||
|
||
#[macro_export] | ||
macro_rules! private_mod_reexported { | ||
() => {} | ||
} | ||
} | ||
|
||
pub mod macros { | ||
pub use crate::private_mod_reexported; | ||
pub use crate::top_level_reexported; | ||
} | ||
|
||
pub mod glob_reexports { | ||
pub use crate::macros::*; | ||
} | ||
|
||
pub mod reexports { | ||
pub use crate::macros::{private_mod_reexported, top_level_reexported}; | ||
} |