Skip to content
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

Use pseudocode to document transmute_ref #1050

Merged
merged 1 commit into from
Mar 19, 2024
Merged

Use pseudocode to document transmute_ref #1050

merged 1 commit into from
Mar 19, 2024

Conversation

jswrenn
Copy link
Collaborator

@jswrenn jswrenn commented Mar 15, 2024

To my eyes, this is much more easily comprehensible at a glance than the prosaic alternative.

If this looks good to you, @joshlf, I'll apply the pattern to transmute! and transmute_mut! too.

Partially addresses #1046.

Copy link
Member

@joshlf joshlf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe also mention that the argument and return types are inferred from the calling context? That aspect of the behavior differs from the given function since, with a function, you can specify the types if you want. A caller might expect our macro to support some sort of type syntax akin to transmute_ref::<S, D>.

@jswrenn jswrenn requested a review from joshlf March 17, 2024 16:12
@jswrenn jswrenn enabled auto-merge March 18, 2024 13:46
@jswrenn jswrenn added this pull request to the merge queue Mar 19, 2024
Merged via the queue into main with commit 9fe8aae Mar 19, 2024
210 checks passed
@jswrenn jswrenn deleted the doc-transmute_ref branch March 19, 2024 15:00
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.

None yet

2 participants