Skip to content

Warn about path change for #[doc(include)] #63335

Closed
@hdevalence

Description

@hdevalence

Recently (#60938) the path root for #[doc(include)] files was changed. This change makes a lot of sense, and it's not difficult to update, but there is now a situation where code using the old path roots won't compile on new nightlies and vice versa.

Because the error message is just that the file is missing, there's a lot of confusion (e.g., dalek-cryptography/bulletproofs#290, dalek-cryptography/bulletproofs#282, dalek-cryptography/bulletproofs#292, dalek-cryptography/curve25519-dalek#269, dalek-cryptography/curve25519-dalek#275) about build failures.

Would it be possible to add a warning to the "file missing" error for #[doc(include)] noting that the path changed recently? This won't help the case of compiling new-doc-paths-on-old-nightlies but might give a hint about what's going on when there's a build failure with old-doc-paths-on-new-nightlies.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-diagnosticsArea: Messages for errors, warnings, and lintsC-enhancementCategory: An issue proposing an enhancement or a PR with one.F-external_doc`#![feature(external_doc)]`T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions