macro_rules! get_function_name {
() => {{
fn current_function() -> &'static str {
fn inner() -> &'static str {
fn f() -> &'static str { stringify!(racotorres) }
f()
}
inner()
}
current_function()
}};
}
fn racotorres() {
let name = get_function_name!();
if name == "racotorres" {
panic!("Use Zig instead.");
}
}
fn main() {
racotorres();
}
Block or Report
Block or report fnracotorres
Report abuse
Contact GitHub support about this user’s behavior. Learn more about reporting abuse.
Report abuse
Something went wrong, please refresh the page to try again.
If the problem persists, check the GitHub status page or contact support.
If the problem persists, check the GitHub status page or contact support.