//! Resolve the real dependency name of the `rust-dix` crate.
//!
//! Before DIX-1 the macros hardcoded `::rust_dix`, so a downstream crate that
//! renamed the dependency (`dix = { package = "rust-dix" }`) had to add
//! `extern crate dix as rust_dix;` shims to its crate roots. Expansions now
//! address the crate through [`dix_crate_path`].
use ;
use quote;
/// Path to the `rust-dix` crate as seen from the crate the macro expands into.
///
/// - Dependency found (renamed or not) → `::<real name>`, e.g. `::dix`.
/// - Expanding inside `rust-dix` itself (unit tests) → `crate`.
/// - Doctests are compiled as a separate crate linked against the library, so
/// `crate` would point at the doctest wrapper; rustdoc flags them with
/// `UNSTABLE_RUSTDOC_TEST_PATH`, and the library is `::rust_dix` there.
/// - Manifest unreadable or dependency absent → keep the historical
/// `::rust_dix` so `rust-dix-macros` used directly behaves as before.
pub