mozilla/rust — pull request #9668 by glycerine (2013-10-01 23:23:12+00:00)
Title: func!() implementation

Dear Rust Developers

This isn't so much a final pull request, as a way to ask for detailed assistance now that I've gotten to the point where I can't figure out how to get these final finishing touches on the func!() macro, which provides output somewhat similar to C99's __FUNC__, but also includes the file location because of anonymous functions (lambdas).

The current pull request provides a test file for the func!() functionaly. It is called rust/src/test/run-pass/syntax-extension-func.rs

; it contains 8 tests. Currently only the first one passes, the others do not, hence they are commented out. Using func!() in a regular function seems to work. Yay! But there are plenty of other kinds of functions that need to be trace-able too!

The part where I'm stuck is: how do I get the method names from traits, extensions, and lambdas?

Thanks!

Jason