From a2cffbc24e28288dc402fbbb16f05ea228dfacf0 Mon Sep 17 00:00:00 2001 From: Daniel Schemmel Date: Fri, 8 Mar 2024 21:16:10 +0000 Subject: [PATCH] demo pub function generation --- sample/src/main.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sample/src/main.rs b/sample/src/main.rs index e98ae86..7e4f183 100644 --- a/sample/src/main.rs +++ b/sample/src/main.rs @@ -5,6 +5,9 @@ // This macro supports visibility-specifiers, like `build_info!(pub fn how_this_crate_was_built)`. build_info::build_info!(fn build_info); +// The same, but as a public function: +build_info::build_info!(pub fn build_info); + fn main() { // We can now either use the `build_info` function to work with the collected data at runtime... println!("{:#?}", build_info());