Skip to content

Conversation

@kingwingfly
Copy link
Contributor

Objective

The tests should be run both with and without --cfg docsrs.

// no {1}
all_tuples!(
    #[doc(fake_variadic)]
    baz,
    2,
    3,
    T
);

It is needed since only with --cfg docsrs, impl for (T,) should be generated.

#[cfg(docsrs)]
assert_impl_one!(((),): Baz);
#[cfg(not(docsrs))]
assert_not_impl_any!(((),): Baz);

Solution

modified ci.yaml

Testing

I don't know how to test GitHub CI on my machine.

Add dtolnay/rust-toolchain@nightly and a step that runs cargo test
with RUSTFLAGS including --cfg docsrs to ensure docsrs-specific code
is exercised in CI
@BenjaminBrienen BenjaminBrienen merged commit 94f0247 into bevyengine:main Jan 17, 2026
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants