# What happened to \`func!()'?

**URL:** <https://internals.rust-lang.org/t/what-happened-to-func/12981>\
**Category:** Uncategorized\
**Created:** [August 31, 2020, 2:14pm UTC](https://internals.rust-lang.org/t/what-happened-to-func/12981 "2020-08-31T14:14:32Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ckaran](https://avatars.discourse-cdn.com/v4/letter/c/f475e1/32.png) [@ckaran](https://internals.rust-lang.org/u/ckaran)\
**Post date:** [August 31, 2020, 2:14pm UTC](https://internals.rust-lang.org/t/what-happened-to-func/12981/1 "2020-08-31T14:14:33Z")

</div>

If I remember correctly, there was discussion at one point for creating a new built-in macro named `func!()`, similar to `file!()` and `line!()`. I can't find the original discussion now, and I have no idea what happened to the idea. Does anyone know what happened to the idea? Was it ever resolved, or did the discussion just fall away?

The only thing that I really remember was that there were concerns about how to deal with closures, but I don't remember anything else about it.

---

<div class="post-metadata">

**Author:** ![matt1985](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/matt1985/32/4772_2.png) [@matt1985](https://internals.rust-lang.org/u/matt1985)\
**Post date:** [August 31, 2020, 7:14pm UTC](https://internals.rust-lang.org/t/what-happened-to-func/12981/2 "2020-08-31T19:14:19Z")

</div>

I found this RFC that was closed by the author [https://github.com/rust-lang/rfcs/pull/2818](https://github.com/rust-lang/rfcs/pull/2818)

---

<div class="post-metadata">

**Author:** ![ckaran](https://avatars.discourse-cdn.com/v4/letter/c/f475e1/32.png) [@ckaran](https://internals.rust-lang.org/u/ckaran)\
**Post date:** [August 31, 2020, 7:37pm UTC](https://internals.rust-lang.org/t/what-happened-to-func/12981/3 "2020-08-31T19:37:53Z")

</div>

@matt1985 Thank you for the link. It's a shame that it died due to people being busy, but such is life! Fortunately, the `stdext` crate's [function\_name](https://docs.rs/stdext/0.2.1/stdext/macro.function_name.html) macro that was referenced at the end of the link you gave works well enough. Maybe some day it will make it into stdlib.

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/system/32/14092_2.png) [@system](https://internals.rust-lang.org/u/system)\
**Post date:** [November 29, 2020, 7:37pm UTC](https://internals.rust-lang.org/t/what-happened-to-func/12981/4 "2020-11-29T19:37:55Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
