Closed awoimbee closed 1 year ago
I want to use this crate to template function names that are not in the current module. It's because I have a weird use-case where I have routes like get_blob, get_blob_2level, ... here.
get_blob
get_blob_2level
This example speaks for itself:
/// calls ${fn}(), ${fn}_1(), ${fn}_2() macro_rules! super_caller { ($fn:expr) => { paste::paste! { $fn(); [< $fn _1 >](); [< $fn _2 >](); } } } fn toto() {} fn toto_1() {} fn toto_2() {} fn main() { super_caller!(toto); // OK super_caller!(crate::toto); // expected identifier after `:` }
I think this is working as intended -- crate::toto_1 is not a valid identifier.
crate::toto_1
I want to use this crate to template function names that are not in the current module. It's because I have a weird use-case where I have routes like
get_blob
,get_blob_2level
, ... here.This example speaks for itself: