Skip to content

improve casting section - #13146

Closed
ShahakShama wants to merge 1 commit into
shahak/style-guide-return-value-split-two-linesfrom
shahak/style-guide-improve-casting
Closed

ShahakShama wants to merge 1 commit into
shahak/style-guide-return-value-split-two-linesfrom
shahak/style-guide-improve-casting

Conversation

@ShahakShama

@ShahakShama ShahakShama commented Mar 10, 2026 •

Copy link
Copy Markdown
Contributor

Note

Low Risk
Low risk documentation-only change that clarifies when to use into/from and adds rationale about as cast overflow behavior.

Overview
Updates the Rust style guide’s Casting section to give clearer guidance on choosing into/try_into vs from/try_from based on whether the compiler can infer the target type.

Also adds a brief rationale explaining why as casts are discouraged (silent saturation on overflow/underflow), alongside the existing linter prohibition and example.

Written by Cursor Bugbot for commit 1221a77. This will update automatically on new commits. Configure here.

@reviewable-StarkWare

Copy link
Copy Markdown

This change is Reviewable

ShahakShama commented Mar 10, 2026 •

Copy link
Copy Markdown
Contributor Author

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

@ShahakShama
ShahakShama force-pushed the shahak/style-guide-combinators-compile branch from e81eb9d to c20618c Compare March 15, 2026 14:58
@ShahakShama
ShahakShama force-pushed the shahak/style-guide-improve-casting branch from 5e753e0 to 3894595 Compare March 15, 2026 14:58
@ShahakShama
ShahakShama force-pushed the shahak/style-guide-combinators-compile branch from c20618c to b90e84a Compare March 16, 2026 07:38
@ShahakShama
ShahakShama force-pushed the shahak/style-guide-improve-casting branch from 3894595 to 1221a77 Compare March 16, 2026 07:38
@ShahakShama
ShahakShama force-pushed the shahak/style-guide-improve-casting branch from 1221a77 to ceda95f Compare April 9, 2026 11:50
@ShahakShama
ShahakShama force-pushed the shahak/style-guide-combinators-compile branch from 8563a47 to ec9c5ff Compare April 9, 2026 12:12
@ShahakShama
ShahakShama force-pushed the shahak/style-guide-improve-casting branch 2 times, most recently from 73a5a4c to bcd920f Compare April 9, 2026 12:15
@ShahakShama
ShahakShama force-pushed the shahak/style-guide-combinators-compile branch from 45a0e05 to c03e963 Compare April 13, 2026 10:51
@ShahakShama
ShahakShama force-pushed the shahak/style-guide-improve-casting branch from bcd920f to 87370f6 Compare April 13, 2026 10:51
@ShahakShama
ShahakShama changed the base branch from shahak/style-guide-combinators-compile to graphite-base/13146 April 15, 2026 05:53
@ShahakShama
ShahakShama force-pushed the shahak/style-guide-improve-casting branch from 87370f6 to cbd73cd Compare April 15, 2026 05:53
@ShahakShama
ShahakShama force-pushed the graphite-base/13146 branch from c03e963 to 73c95e7 Compare April 15, 2026 05:53
@ShahakShama
ShahakShama changed the base branch from graphite-base/13146 to shahak/style-guide-return-value-split-two-lines April 15, 2026 05:53
@ShahakShama
ShahakShama force-pushed the shahak/style-guide-return-value-split-two-lines branch from 73c95e7 to b974ec2 Compare April 28, 2026 13:43
@ShahakShama
ShahakShama force-pushed the shahak/style-guide-improve-casting branch from cbd73cd to 95ef492 Compare April 28, 2026 13:43
@github-actions

Copy link
Copy Markdown

There hasn't been any activity on this pull request recently, and in order to prioritize active work, it has been marked as stale.
This PR will be closed and locked in 7 days if no further activity occurs.
Thank you for your contributions!

@github-actions github-actions Bot added the stale label May 29, 2026
@github-actions github-actions Bot closed this Jun 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants