macro_rules! uninstantiated {
    () => { ... };
}
Expand description

Produces the name of the surrounding function or method, without generics instantiated.

Example

struct GenericType<A>(A);

impl<A> GenericType<A> {
    fn generic_method<B>(self, _: B) -> &'static str {
        fn_name::uninstantiated!()
    }
}

fn main() {
    assert_eq!(
        GenericType(42u8).generic_method(false),
        "GenericType<_>::generic_method"
    );
}