| Crates.io | func_ |
| lib.rs | func_ |
| version | 1.0.1 |
| created_at | 2023-09-21 12:17:28.234051+00 |
| updated_at | 2023-09-25 02:39:53.784917+00 |
| 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");
}