Skip to content

fixed the error message for a user to open the crate#14957

Closed
ibilalkayy wants to merge 3 commits intorust-lang:masterfrom
ibilalkayy:crate_doc
Closed

fixed the error message for a user to open the crate#14957
ibilalkayy wants to merge 3 commits intorust-lang:masterfrom
ibilalkayy:crate_doc

Conversation

@ibilalkayy
Copy link
Contributor

@ibilalkayy ibilalkayy commented Dec 18, 2024

What does this PR try to resolve?

This PR is resolving an issue where cargo doc --open --examples does not give a clear message when the examples file is given to it.

I changed the message from no crates with documentation in the cargo_doc.rs and doc.rs to requested crate documentation is not available to open. Now it becomes easy for the user to understand what they're missing.

Fixes #14776

How should we test and review this PR?

Here is the command through which you can test this change:

cargo test SNAPSHOTS=overwrite -- doc::open_no_doc_crate

@rustbot
Copy link
Collaborator

rustbot commented Dec 18, 2024

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @epage (or someone else) some time within the next two weeks.

Please see the contribution instructions for more information. Namely, in order to ensure the minimum review times lag, PR authors and assigned reviewers should ensure that the review label (S-waiting-on-review and S-waiting-on-author) stays updated, invoking these commands when appropriate:

  • @rustbot author: the review is finished, PR author should check the comments and take action accordingly
  • @rustbot review: the author is ready for a review, this PR will be queued again in the reviewer's queue

@rustbot rustbot added Command-doc S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Dec 18, 2024
@ibilalkayy ibilalkayy requested a review from epage December 19, 2024 00:14
@0xPoe
Copy link
Member

0xPoe commented Dec 19, 2024

@ibilalkayy The fmt check failed. You need to run cargo fmt --all.

@ibilalkayy
Copy link
Contributor Author

Thank you, @Rustin170506! I was not aware of this. Once I get the clarification message from @epage, I will push again.

@epage
Copy link
Contributor

epage commented Dec 19, 2024

Would you be ok cleaning up the commit history?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Command-doc S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

cargo doc --open error message is confusing when all targets are skipped

4 participants