-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
The "unstable" documentation attribute on intrinsics should mention the specific stabilized interface for each individual intrinsic #34338
Comments
Add documentation to some of the unstable intrinsics Part of rust-lang#34338
Add documentation to some of the unstable intrinsics Part of rust-lang#34338
Revisiting this, today the intrinsics docs warning message no longer says anything about "instead they should be used through stabilized interfaces in the rest of the standard library", which obviates half of this bug by no longer causing doc readers to wonder at what the stable replacement might be. It also seems that some of the intrinsics have had this issue addressed (e.g. my original example of volatile_store). While it would still be valuable to be sure that any intrinsic with a stable counterpart has that counterpart mentioned in its docs, I'd say that this bug could be closed at the blessing of the docs team. |
Triage: Punting this to docs team; the unstable attribute doesn't carry any additional information for intrinsics, so any link back to one's stable interface would have to go into the hand-written portion of their docs. That means that this is effectively a checklist issue, if anyone is interested in taking this up... 👀 |
@bstrie @QuietMisdreavus I just saw that if you click the "This is a nightly-only experimental API."-part in I don't mind picking up this issue! I just have three questions:
|
@bstrie @QuietMisdreavus Could you maybe still respond to my previous message? Then hopefully I can take this up soon! |
@DevQps Hello! For definitive answers to those questions I would direct you to ask the docs team, but I can hazard guesses:
|
I’ve started working on this, I will probably open a PR pretty soon For the moment, I have documented the |
Great to hear that! |
…r=steveklabnik Add documentation to compiler intrinsics This adds documentation to the compiler intrinsics having stable standard implementations. Relates to rust-lang#34338 (cc @bstrie) r? @steveklabnik (for reassignment?)
document missing stable counterparts of intrinsics Notes the stable counterpart of each intrinsic in case one exists. Implements rust-lang#34338 r? @Dylan-DPC
@lcnr @LeSeulArtichaut Thank you both for your hard work! I think #71672 implements this issue and we can probably close this now I guess? Or am I missing something? @steveklabnik I have been off for a a few months (more then I would have hoped for...) but I am finally back to do some work again :) |
Closing this as it is fixed. |
Today if one navigates to the docs to, for example,
intrinsic::volatile_store
(http://doc.rust-lang.org/core/intrinsics/fn.volatile_store.html) you see this warning:But not all intrinsics have stabilized interfaces, and even when they exist this message is not helpful in determining exactly what those interfaces are.
In the specific example of
intrinsic::volatile_store
, this should mention that its stabilized interface isptr::write_volatile
(https://doc.rust-lang.org/std/ptr/fn.write_volatile.html).Intrinsics that do not have such stabilized interfaces should have instead reference issues in the Rust bug tracker that involve creating stabilized interfaces, or alternately a metabug that covers all unstable intrinsics that do not have stable interfaces.
If it has been decided that a given intrinsic will never have a stabilized interface for whatever reason, then the unstable documentation attribute should contain the reason why, and/or a link to the discussion where such a decision was arrived upon.
The text was updated successfully, but these errors were encountered: