The answer depends on what you want. You can use `ty::item_path()`
which will give you something like what you want, but maybe not
quite. Basically if `ty::item_path()` refers to an item `Y::Z` in
crate `X`, it will give a path like `X::Y::Z`. But this path may not
be valid relative to the current crate, since the crate `X` could have
been declared somewhere else.
For example, in this scenario `ty::item_path()` would give a path
that cannot actually be used by the user:
mod foo {
extern mod X;
}
Here `ty::item_path()` would return `X::Y::Z` but maybe you wanted the
`foo::X::Y::Z`.
Niko
On Sun, Aug 04, 2013 at 02:29:06AM -0400, Corey Richardson wrote:
> Hi all,
>
> Another roadbump with rustdoc_ng, but we're getting real close! When a
> reference to a type in an external crate is found, I'd like to include
> the fully-qualified name in the JSON. This will enable easier
> hyperlinking between crates. However, I'm not sure where I can get the
> fully-qualified name, if anywhere. I'd expect to find this
> functionality in resolve somewhere, since it'd need to look into the
> modules that are in scope and determine which it is/where it comes
> from etc.
>
> Is it possible?
> _______________________________________________
> Rust-dev mailing list
> [email protected]
> https://mail.mozilla.org/listinfo/rust-dev
_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev