Note that it's doesn't have to be lossy with:

> add the string to the current mod_path

That is, when you are entering a nested function or module you add the outer function name to the module path. So

```rust
// mod_path = []
// func_name = None
fn foo() {
   // mod_path = []
   // func_name = Some("foo")
   fn inner() {
      // mod_path = ["foo"]
      // func_name = Some("inner")
      mod innerinner {
         // mod_path = ["foo", "inner"]
         // func_name = None
      }
      // pop mod_path, and make func_name Some("inner") again.
   }
   // pop mod_path, and make func_name Some("foo") again.
}
// pop mod_path, make func_name None
```