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

Fix examples of proc-macro crates being scraped for examples #11497

Merged
merged 1 commit into from
Dec 18, 2022

Conversation

willcrichton
Copy link
Contributor

This PR fixes #11496, where examples in proc-macro crates would crash the build with -Zrustdoc-scrape-examples. The fix is to change unit_needs_doc_scrape to check if a unit is coming from a proc-macro package. I added a test to ensure the simple example passes. I also ensured that automod also documents correctly.

r? @weihanglo

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Dec 18, 2022
Copy link
Member

@weihanglo weihanglo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Thank you for the quick fix.

@weihanglo
Copy link
Member

@bors r+

BTW, @willcrichton, is it urgent? I could make a Cargo nightly update if docs.rs needs that.

@bors
Copy link
Contributor

bors commented Dec 18, 2022

📌 Commit d588298 has been approved by weihanglo

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Dec 18, 2022
@bors
Copy link
Contributor

bors commented Dec 18, 2022

⌛ Testing commit d588298 with merge c994a4a...

@bors
Copy link
Contributor

bors commented Dec 18, 2022

☀️ Test successful - checks-actions
Approved by: weihanglo
Pushing c994a4a to master...

@bors bors merged commit c994a4a into rust-lang:master Dec 18, 2022
weihanglo added a commit to weihanglo/rust that referenced this pull request Dec 18, 2022
11 commits in cc0a320879c17207bbfb96b5d778e28a2c62030d..c994a4a638370bc7e0ffcbb0e2865afdfa7d4415
2022-12-14 14:46:57 +0000 to 2022-12-18 21:50:58 +0000
- Fix examples of proc-macro crates being scraped for examples (rust-lang/cargo#11497)
- Enable triagebot's relabel functionality (rust-lang/cargo#11498)
- Revert "temporarily disable test `lto::test_profile`" (rust-lang/cargo#11495)
- Bump to 0.69.0, update changelog (rust-lang/cargo#11493)
- Fix typo (rust-lang/cargo#11491)
- Display CPU info in CI (rust-lang/cargo#11488)
- Fix collision_doc_profile test error (rust-lang/cargo#11489)
- fix: Make auto-fix note work with `clippy` (rust-lang/cargo#11399)
- fix(add): use the possessive in error message (rust-lang/cargo#11483)
- Document home crate in contrib docs (rust-lang/cargo#11481)
- Split up registry documentation into multiple sections (rust-lang/cargo#11480)
bors added a commit to rust-lang-ci/rust that referenced this pull request Dec 19, 2022
Update cargo

11 commits in cc0a320879c17207bbfb96b5d778e28a2c62030d..c994a4a638370bc7e0ffcbb0e2865afdfa7d4415 2022-12-14 14:46:57 +0000 to 2022-12-18 21:50:58 +0000
- Fix examples of proc-macro crates being scraped for examples (rust-lang/cargo#11497)
- Enable triagebot's relabel functionality (rust-lang/cargo#11498)
- Revert "temporarily disable test `lto::test_profile`" (rust-lang/cargo#11495)
- Bump to 0.69.0, update changelog (rust-lang/cargo#11493)
- Fix typo (rust-lang/cargo#11491)
- Display CPU info in CI (rust-lang/cargo#11488)
- Fix collision_doc_profile test error (rust-lang/cargo#11489)
- fix: Make auto-fix note work with `clippy` (rust-lang/cargo#11399)
- fix(add): use the possessive in error message (rust-lang/cargo#11483)
- Document home crate in contrib docs (rust-lang/cargo#11481)
- Split up registry documentation into multiple sections (rust-lang/cargo#11480)

r? `@ghost`
@willcrichton
Copy link
Contributor Author

BTW, @willcrichton, is it urgent? I could make a Cargo nightly update if docs.rs needs that.

@weihanglo this is blocking a couple crates from compiling on docs.rs, so an update soon would be great. Thank you!

@ehuss ehuss added this to the 1.68.0 milestone Dec 30, 2022
@weihanglo weihanglo added the Z-scrape-examples Nightly: rustdoc scrape examples label Sep 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. Z-scrape-examples Nightly: rustdoc scrape examples
Projects
None yet
Development

Successfully merging this pull request may close these issues.

-Zrustdoc-scrape-examples crash if a package contains proc-macro library and example crate
5 participants