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 reports issues against lib.rs rather than an include_str!'d file #130470

Open
fasterthanlime opened this issue Sep 17, 2024 · 4 comments · May be fixed by #130582
Open

rustdoc reports issues against lib.rs rather than an include_str!'d file #130470

fasterthanlime opened this issue Sep 17, 2024 · 4 comments · May be fixed by #130582
Labels
A-diagnostics Area: Messages for errors, warnings, and lints C-bug Category: This is a bug. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@fasterthanlime
Copy link
Contributor

The repro repository has everything: https://github.com/fasterthanlime/readme-md-error-reporting

Expected behavior is that the diagnostics have: --> README.md:7:16, but they currently have --> src/lib.rs:7:16.

@fasterthanlime fasterthanlime added the C-bug Category: This is a bug. label Sep 17, 2024
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Sep 17, 2024
@fasterthanlime
Copy link
Contributor Author

fasterthanlime commented Sep 17, 2024

cc @GuillaumeGomez (as per Mastodon discussion)

@saethlin saethlin added T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. A-diagnostics Area: Messages for errors, warnings, and lints and removed needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. labels Sep 18, 2024
@GuillaumeGomez
Copy link
Member

GuillaumeGomez commented Sep 18, 2024

Thanks for opening the issue! I'm surprised since it's an issue that was supposed to be fixed in #123204. Just to confirm: which rustc version do you use?

Also cc @notriddle since you're the one who fixed this bug.

@fasterthanlime
Copy link
Contributor Author

This happened with 1.81 most likely — I would take the few secs to check but I’m on a phone right now.

@notriddle notriddle linked a pull request Sep 19, 2024 that will close this issue
@notriddle
Copy link
Contributor

The doctest system needs to use the same infrastructure as the rest of rustdoc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-diagnostics Area: Messages for errors, warnings, and lints C-bug Category: This is a bug. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants