Skip to content

Conversation

m-ysk
Copy link
Contributor

@m-ysk m-ysk commented May 2, 2022

Fixes #88038

This PR aims to include nonexported macro_rules! macros in the doctest target. For more details, please see the above issue.

@rustbot rustbot added the T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. label May 2, 2022
@m-ysk m-ysk marked this pull request as draft May 2, 2022 10:31
@rust-log-analyzer

This comment has been minimized.

@jyn514
Copy link
Member

jyn514 commented May 2, 2022

I'm no longer part of the rustdoc team, please don't assign me. You can use r? rust-lang/rustdoc to reroll high-five.

@m-ysk
Copy link
Contributor Author

m-ysk commented May 3, 2022

r? rust-lang/rustdoc

@m-ysk m-ysk marked this pull request as ready for review May 3, 2022 09:34
@rust-log-analyzer

This comment has been minimized.

@m-ysk m-ysk requested a review from notriddle May 3, 2022 17:12
@notriddle
Copy link
Contributor

@bors r+

@bors
Copy link
Collaborator

bors commented May 3, 2022

📌 Commit 4698a3f has been approved by notriddle

@bors bors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label May 3, 2022
JohnTitor added a commit to JohnTitor/rust that referenced this pull request May 3, 2022
Include nonexported macro_rules! macros in the doctest target

Fixes rust-lang#88038

This PR aims to include nonexported `macro_rules!` macros in the doctest target. For more details, please see the above issue.
@bors
Copy link
Collaborator

bors commented May 5, 2022

⌛ Testing commit 4698a3f with merge 3d18f94...

@bors
Copy link
Collaborator

bors commented May 5, 2022

☀️ Test successful - checks-actions
Approved by: notriddle
Pushing 3d18f94 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label May 5, 2022
@bors bors merged commit 3d18f94 into rust-lang:master May 5, 2022
@rustbot rustbot added this to the 1.62.0 milestone May 5, 2022
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (3d18f94): comparison url.

Summary:

  • Primary benchmarks: 🎉 relevant improvement found
  • Secondary benchmarks: no relevant changes found
Regressions 😿
(primary)
Regressions 😿
(secondary)
Improvements 🎉
(primary)
Improvements 🎉
(secondary)
All 😿 🎉
(primary)
count1 0 0 1 0 1
mean2 N/A N/A -0.2% N/A -0.2%
max N/A N/A -0.2% N/A -0.2%

If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf.

@rustbot label: -perf-regression

Footnotes

  1. number of relevant changes

  2. the arithmetic mean of the percent change

bors bot added a commit to rayon-rs/rayon that referenced this pull request May 12, 2022
935: Convert delegate doctest to unit tests r=cuviper a=cuviper

The documented example wasn't functional, and this broke on nightly since rust-lang/rust#96630.

We can't actually doctest a nonexported macro, but a unit test will do.

Co-authored-by: Josh Stone <[email protected]>
@cuviper cuviper added the relnotes Marks issues that should be documented in the release notes of the next release. label May 16, 2022
djkoloski added a commit to djkoloski/h2 that referenced this pull request May 17, 2022
Nightly has begun running doctests for unexported macros as of
rust-lang/rust#96630, which caused a doctest for
test_unpack_octets_4 which was previously ignored to be run. This broke
the CI because macros that are not exported with `#[macro_export]`
cannot be used from external crates (and thus cannot be doctested). This
change ignores the doctest and copies the relevant code into a unit
test.
seanmonstar pushed a commit to hyperium/h2 that referenced this pull request May 18, 2022
Nightly has begun running doctests for unexported macros as of
rust-lang/rust#96630, which caused a doctest for
test_unpack_octets_4 which was previously ignored to be run. This broke
the CI because macros that are not exported with `#[macro_export]`
cannot be used from external crates (and thus cannot be doctested). This
change ignores the doctest and copies the relevant code into a unit
test.

Co-authored-by: David Koloski <[email protected]>
bors bot added a commit to nix-rust/nix that referenced this pull request May 31, 2022
1730: Ignore doctests for unexported macros r=asomers a=zombiepigdragon

Due to rust-lang/rust#97030, cargo test will fail to doctest macros unless they are exported, breaking the examples for `libc_bitflags!` and `libc_enum!`.

Adds `ignore` to the examples for these macros to stop tests from failing.

`cargo test` already fails on cargo 1.62.0-beta.2, and the above issue makes it seem unlikely that this will be changed on the Rust side. If rust-lang/rust#96630 *does* get reverted, this PR can be closed/unmerged, although the test wasn't running beforehand, and it might be worth making this explicit regardless.

Co-authored-by: Alex Rawson <[email protected]>
Xiretza added a commit to Xiretza/sodiumoxide that referenced this pull request Jun 15, 2022
Since Rust 1.62.0, doctests on macros are run even if the macro isn't
marked #[macro_export] [0]. Because the macro can't actually be accessed
externally, we explicitly mark the doctest as ignored so it continues
not to be run.

[0]: rust-lang/rust#96630
Xiretza added a commit to Xiretza/sodiumoxide that referenced this pull request Jun 15, 2022
Since Rust 1.62.0, doctests on macros are run even if the macro isn't
marked #[macro_export] [0]. Because the macro can't actually be accessed
externally, we explicitly mark the doctest as ignored so it continues
not to be run.

[0]: rust-lang/rust#96630
@steffahn
Copy link
Member

This PR has a relnotes tag, but somehow, I can’t find anything about it in the 1.62 release notes. Is this the right place to ask about that? See also #98735, where this change is perceived as a regression (bug) due to it being undocumented.

@Mark-Simulacrum
Copy link
Member

Probably not - could you file an issue on the release team repo for us to investigate?

@steffahn
Copy link
Member

This repo? (I’m asking because there’s not too many issues over there.)

matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jul 1, 2022
Add macro_rules! rustdoc change to 1.62 relnotes

rust-lang#96630 was tagged <kbd>relnotes</kbd> but didn't make it into the notes. Given this is a compatibility issue (rust-lang#97030, rust-lang#98735, rust-lang#98743), it probably *should* be retroactively added.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. relnotes Marks issues that should be documented in the release notes of the next release. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Doctests don't run on nonexported macro_rules! macros
10 participants