Skip to content

Instantly share code, notes, and snippets.

@rust-play
Created April 19, 2021 18:39
Show Gist options
  • Save rust-play/b731c7f9d374b2bbd7cd07d662e0a093 to your computer and use it in GitHub Desktop.
Save rust-play/b731c7f9d374b2bbd7cd07d662e0a093 to your computer and use it in GitHub Desktop.
Code shared from the Rust Playground
mod foo {
pub fn name() -> &'static str {
module_path!()
}
}
fn main() {
println!("Hello, {}", foo::name());
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment