-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Include nonexported macro_rules! macros in the doctest target #96630
Conversation
This comment has been minimized.
This comment has been minimized.
I'm no longer part of the rustdoc team, please don't assign me. You can use |
r? rust-lang/rustdoc |
This comment has been minimized.
This comment has been minimized.
@bors r+ |
📌 Commit 4698a3f has been approved by |
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.
☀️ Test successful - checks-actions |
Finished benchmarking commit (3d18f94): comparison url. Summary:
If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf. @rustbot label: -perf-regression Footnotes |
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]>
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.
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]>
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]>
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
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
This PR has a |
Probably not - could you file an issue on the release team repo for us to investigate? |
This repo? (I’m asking because there’s not too many issues over there.) |
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.
Fixes #88038
This PR aims to include nonexported
macro_rules!
macros in the doctest target. For more details, please see the above issue.