Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- fn main() {
- foo!("hello"); // no import necessary at the root
- bar::baz();
- }
- mod bar {
- use crate::foo; // this import is required
- pub fn baz() {
- foo!("goodbye");
- }
- }
- mod test {
- #[macro_export]
- macro_rules! foo {
- ($fmt:expr) => (print!(concat!($fmt, "\n")));
- }
- }
Add Comment
Please, Sign In to add comment