Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Intralinks to identifiers that are re-exported do not work (the standard library does this a lot) #5

Open
orium opened this issue Nov 7, 2021 · 0 comments

Comments

@orium
Copy link
Owner

orium commented Nov 7, 2021

Intralinks do not resolve re-exports. This means that if you have

mod foo {
    pub mod bar {
        struct Bar {}
    }
}

pub use foo::bar;

you cannot have an intralink to crate::bar::Bar, because re-exports are not resolved by cargo-rdme.

This would be a reasonably acceptable limitation, if it wasn't a very common pattern in the standard library. For instance things defined in alloc are then re-exported in std, for instance, you cannot link to ::std::vec::Vec. This makes it a much more annoying limitation which deserves to be fixed.

Something that we need to support is crate imports with rename (again, a common pattern in the standard library). For instance, this is how std::vec comes to be:

extern crate alloc as alloc_crate;pub use alloc_crate::vec;

This is independent from supporting use re-exports.

@orium orium changed the title Intralinks to identifiers that are exported do not work (the standard library does this a lot) Intralinks to identifiers that are re-exported do not work (the standard library does this a lot) Feb 15, 2022
MaxOhn added a commit to MaxOhn/rosu-mods that referenced this issue Jul 4, 2024
`cargo rdme` currently doesn't support re-exported types so modules that
define types that appear in the crate-level docs must be accessible.

See <orium/cargo-rdme#5>
MaxOhn added a commit to MaxOhn/rosu-mods that referenced this issue Jul 4, 2024
`cargo rdme` currently doesn't support re-exported types so modules that
define types that appear in the crate-level docs must be accessible.

See orium/cargo-rdme#5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant