feat(runtime-core) func! supports closures.

This patch allows to write:

```rs
func!(|…| -> … { … })
```
This commit is contained in:
Ivan Enderlin 2019-11-13 15:54:09 +01:00
parent 72864934f9
commit 82e4d8e6cc

View File

@ -47,7 +47,7 @@ macro_rules! trace {
/// Helper macro to create a new `Func` object using the provided function pointer.
#[macro_export]
macro_rules! func {
($func:path) => {{
($func:expr) => {{
$crate::Func::new($func)
}};
}