Skip to content

Rustdoc on private crate gives infinite redirect loop #18715

Closed
@Manishearth

Description

@Manishearth

While looking for a different rustdoc bug, I found that the following lib.rs

#[test]
fn it_works() {
}


trait Y{}

impl Y for Option<uint>{}

(cargo new foo followed by adding a trait and an impl to the lib.rs)

produces the following doc/lib/index.html:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta http-equiv="refresh" content="0;URL=../lib/index.html">
</head>
<body>
</body>
</html>

which is just an infinite redirect.

While the crate being empty (externally, due to all private items) means that rustdoc is pretty useless to run, I don't think it should fail into an infinite redirect, which is just confusing.

This doesn't happen if I replace Option with a struct defined within the same crate.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions