-
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
bitflags!
-generated public API has poor documentation UX
#18227
Comments
cc @bjz |
|
We could potentially hack this without associated constants by providing constructor functions corresponding to each constant. But that's pretty ugly. My recollection is that |
Hah, @sfackler beat me to it. :-) |
We could also define |
Triage: the motivating example is gone, but i'm guessing the issue still persists. |
The bitflags macro has been pulled out to a separate crate, so this issue can probably be migrated: http://doc.rust-lang.org/rustc_bitflags/macro.bitflags!.html |
cc @nick29581 |
http://doc.rust-lang.org/bitflags/bitflags/index.html is the new link, and yeah, this still persists. Not moving because this will still affect any user macro docs, but removing a-libs since this is really just a rustdoc issue. |
This is actually a dup of #17616 |
@steveklabnik not a dupe. The motivating example was this I guess, whereas #17616 is about rustdocking the macro itself. |
…nyyx, r=davidbarsky internal: add json `tracing` Layer for profiling startup On `buck2/integrations/rust-project`, this results in the following being printed: ```json {"name":"discover_command","elapsed_ms":18703} {"name":"parallel_prime_caches","elapsed_ms":0} {"name":"vfs_load","elapsed_ms":5895} {"name":"vfs_load","elapsed_ms":547} {"name":"parallel_prime_caches","elapsed_ms":23} {"name":"parallel_prime_caches","elapsed_ms":84} {"name":"parallel_prime_caches","elapsed_ms":5819} ```
Say I'm at the documentation page for
std::io::fs::mkdir
and want to figure out how to call it: http://doc.rust-lang.org/std/io/fs/fn.mkdir.html. I want to figure out what theFilePermission
type is, so I click on the link to its docs. I get sent here: http://doc.rust-lang.org/std/io/struct.FilePermission.html. Unfortunately, that page gives no indication at all of how actually initialize aFilePermission
in a useful way. I have to somehow divine that I need to jump out to the documentation for theio
module and scroll all the way to the bottom to the constants section: http://doc.rust-lang.org/std/io/index.html#constants to actually find some useful values to pass tomkdir
.Associated constants would help with this, as would sufficient compiler support to implement a robust
EnumSet
.The text was updated successfully, but these errors were encountered: