Skip to content

cargo doc doesn't pick up changes to "deleted" modules #3703

Open
@SergioBenitez

Description

I have a project that's structured as follows:

src/
    lib.rs
    module.rs

In lib.rs, I have:

mod module

The git status is:

Changes not staged for commit:

	deleted:    src/module.rs

Untracked files:

	src/module.rs

This git status arose from deleting module.rs and then renaming a different file to module.rs.

When I make changes to lib.rs and run cargo doc, updated documentation is generated. However, if I make changes to module.rs and run cargo doc, documentation is unchanged. The correct thing, of course, is for cargo doc to have picked up the changes. I presume something is going on with how cargo is treating files that git believes are "deleted", and so perhaps this issue is more widespread than just cargo doc.

Metadata

Assignees

No one assigned

    Labels

    A-gitArea: anything dealing with gitA-rebuild-detectionArea: rebuild detection and fingerprintingC-bugCategory: bugCommand-docS-blocked-externalStatus: ❌ blocked on something out of the direct control of the Cargo project, e.g., upstream fix

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions