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();
}
fnracotorres / open-im-server Goto Github PK
View Code? Open in Web Editor NEWThis project forked from openimsdk/open-im-server
IM Chat
Home Page: https://openim.io
License: Apache License 2.0