Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide a macro like std::file!() just for the function name #35651

Closed
sdroege opened this issue Aug 13, 2016 · 4 comments
Closed

Provide a macro like std::file!() just for the function name #35651

sdroege opened this issue Aug 13, 2016 · 4 comments

Comments

@sdroege
Copy link
Contributor

sdroege commented Aug 13, 2016

Having such a macro would be useful for adding context information to logs.

@Aatch
Copy link
Contributor

Aatch commented Aug 15, 2016

This requires an RFC, as there's a fair bit of ambiguity as to what the "name" of a function might be.

@JustAPerson
Copy link
Contributor

Whatever name is generated for debug symbols might be a start. When looking in gdb, those seem unambiguous after monomorphisation etc.

@steveklabnik
Copy link
Member

Yes, new macros need to go through the RFC process, even for relatively trivial ones. See rust-lang/rfcs#1653 as an example. @sdroege please file one if you're interested in pursuing this!

@sdroege
Copy link
Contributor Author

sdroege commented Aug 16, 2016

Thanks, I'll look into that!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants