Crates.io | func_ |
lib.rs | func_ |
version | 1.0.1 |
source | src |
created_at | 2023-09-21 12:17:28.234051 |
updated_at | 2023-09-25 02:39:53.784917 |
description | Proc macro to add function name constant within body of function |
homepage | |
repository | https://github.com/DoumanAsh/func_ |
max_upload_size | |
id | 979394 |
size | 5,957 |
Proc macro to insert function name within body of function because Rust is incapable of doing simple things
Once type_name is stable in const
context this macro can be replaced properly with simple function call on function type.
use func_::_func_;
#[_func_]
fn my_func() {
assert_eq!(__func__, "my_func");
}