method_name 0.3.4

macro that expands to the name of the annotated function
Documentation
1
2
3
4
5
6
7
8
9
10
use ::method_name::named;

#[named]
fn my_super_duper_function() {
    dbg!(method_name!());
}

fn main() {
    my_super_duper_function();
}