-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Documentation for variadics #15387
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
Documentation for variadics #15387
Conversation
@bash do you know why this isn't working? I added the marker attribute but the documentation doesn't have the new look. |
@BenjaminBrienen What command did you use to build the docs? There's some |
Btw |
Yeah I'm getting an error when attempting to build locally:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CI is passing, but I don't know if it builds with the right flags set. Some of these are failing to build docs (likely due to the type being annotated like @bash mentioned).
@alice-i-cecile I'm ready for this to be reviewed again
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The latest commit still fails for me with with various error: #[doc(fake_variadic)] must be used on the first of a set of tuple or fn pointer trait impls with varying arity
s.
I'm using the latest nightly (2024-09-24
) and the following command to build: RUSTFLAGS='--cfg docsrs_dep' RUSTDOCFLAGS='--cfg=docsrs' cargo +nightly doc
Maybe the command that you used didn't correctly export the env vars?
set RUSTFLAGS='--cfg docsrs_dep' && set RUSTDOCFLAGS='--cfg=docsrs' && cargo +nightly doc
If you're using fish you can either use the posix-style syntax that I used above or you have to use set -x
to get the variable exported iirc.
Ah, this command did the trick: Fixing the errors now! |
The docs generate successfully for me now |
5220d47
to
06a681a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Feel free to ignore (and mark resolved) the whitespace issues
EDIT: Sorry, didn't mean to request changes (I blame gh mobile lol)
@@ -1,4 +1,6 @@ | |||
#![cfg_attr(docsrs, feature(doc_auto_cfg))] | |||
// `rustdoc_internals` is needed for `#[doc(fake_variadics)]` | |||
#![allow(internal_features)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this only be enabled on docsrs
and maybe docsrs_dep
to prevent the miniscule chance of it accidentally being depended on elsewhere?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's what I have there, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I meant that maybe internal_features
should also be under a cfg_attr
, should have been clearer
I'm also unsure where |
Changes have been cleaned up. No idea how some of that happened lol. |
@@ -671,6 +671,7 @@ impl_reflect_tuple! {0: A, 1: B, 2: C, 3: D, 4: E, 5: F, 6: G, 7: H, 8: I, 9: J, | |||
|
|||
macro_rules! impl_type_path_tuple { | |||
($(#[$meta:meta])*) => { | |||
$(#[$meta])* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can remove this if wanted
Can you verify that these are working for It's probably a me thing, since |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't tried generating the docs myself (afk) but visually it all looks good to me, thanks for fixing the formatting
# Objective Relevant: bevyengine#15208 ## Solution I went ahead and added the variadics documentation in all applicable locations. ## Testing - I built the documentation and inspected it to see whether the feature is there.
Objective
Relevant: #15208
Solution
I went ahead and added the variadics documentation in all applicable locations.
Testing