I think that should be part of `mod_path!()`. In both cases `func!()` should be `c` and `mod_path!()` should be `a::b` and `a::d` respectively. Notably, if this was implemented, `mod_path!()` should only list functions when inside a module *inside* the function; not by default.

FWIW, I think this would be easiest by having a single `Option<@str>` for `func_path` and when entering a module:
- if it is `Some`, add the string to the current `mod_path` and *clear* the `func_path` (but saving it)
- push the module ident to `mod_path`
- recurse
- pop the `mod_path` (twice, if we pushed a function name)
- restore the old `func_path`

Something similar could happen with nested functions: the parent goes on to the `mod_path`.