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

Rustdoc produces strange output for pub use ::foo; items #96408

Closed
dbeckwith opened this issue Apr 25, 2022 · 1 comment
Closed

Rustdoc produces strange output for pub use ::foo; items #96408

dbeckwith opened this issue Apr 25, 2022 · 1 comment
Labels
C-bug Category: This is a bug.

Comments

@dbeckwith
Copy link

cargo doc produces some strange-looking documention for the following code:

// in lib.rs
pub mod foreign {
    pub use ::chrono;
    pub use ::mime;
    pub use ::url;
    pub use ::uuid;
}

The produced documentation for the foreign module in this crate looks like:

Re-exports

pub use {{root}}::chrono;
pub use {{root}}::mime;
pub use {{root}}::url;
pub use {{root}}::uuid;

I'm not sure why the {{root}} parts are there, I guess they're indicating the leading :: from the crate paths in my use statements but I feel like they should just render like the normal Rust syntax:

Re-exports

pub use ::chrono;
pub use ::mime;
pub use ::url;
pub use ::uuid;

Meta

rustc --version --verbose:

rustc 1.59.0 (9d1b2106e 2022-02-23)
binary: rustc
commit-hash: 9d1b2106e23b1abd32fce1f17267604a5102f57a
commit-date: 2022-02-23
host: x86_64-unknown-linux-gnu
release: 1.59.0
LLVM version: 13.0.0
@dbeckwith dbeckwith added the C-bug Category: This is a bug. label Apr 25, 2022
@dbeckwith
Copy link
Author

duplicate of #95873, my bad

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug.
Projects
None yet
Development

No branches or pull requests

1 participant