Skip to content

Conversation

@rcseacord
Copy link
Contributor

@netlify
Copy link

netlify bot commented Nov 14, 2025

Deploy Preview for scrc-coding-guidelines ready!

Name Link
🔨 Latest commit d35606c
🔍 Latest deploy log https://app.netlify.com/projects/scrc-coding-guidelines/deploys/6931522be7517d00080dd55f
😎 Deploy Preview https://deploy-preview-220--scrc-coding-guidelines.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@felix91gr felix91gr self-assigned this Nov 19, 2025
@felix91gr felix91gr self-requested a review November 19, 2025 16:33
@PLeVasseur PLeVasseur added the coding guideline An issue related to a suggestion for a coding guideline label Nov 25, 2025
Copy link
Collaborator

@felix91gr felix91gr left a comment

Choose a reason for hiding this comment

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

Preliminary review. We have a meeting together now, so I'd better submit it right away.

@rcseacord rcseacord requested a review from felix91gr November 26, 2025 22:18
@rcseacord
Copy link
Contributor Author

@felix91gr please approve me sir I am ready to be merged

@rcseacord
Copy link
Contributor Author

@felix91gr please review me. i'm very sad and wished to be merged.

@felix91gr
Copy link
Collaborator

@rcseacord there's a merge conflict. It seems to be pretty trivial from here, and Github offers to let me resolve it in the Web UI, but I'd rather you resolve them instead because I don't want to break your working copy

rcseacord and others added 8 commits December 3, 2025 19:32
fixed a bunch of small problems and started adding compliant solutions using saturation semantics
adding Wrapping<T> example
Revised guidelines on arithmetic overflow, emphasizing prevention and the use of explicit wrapping functions. Updated examples to reflect compliant practices with saturation semantics.
Clarify guidelines on eliminating arithmetic overflow for various integer types.
Clarify behavior of arithmetic overflow in Rust.
@rcseacord rcseacord force-pushed the feature/arithmetic-overflow branch from aa88512 to 81e0d9e Compare December 4, 2025 00:35
@rcseacord rcseacord requested a review from felix91gr December 4, 2025 00:39
@rcseacord
Copy link
Contributor Author

@felix91gr rebased, please review!

Copy link
Collaborator

@felix91gr felix91gr left a comment

Choose a reason for hiding this comment

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

This should be a reasonable first review, I hope

rcseacord and others added 2 commits December 4, 2025 04:12
Clarified behavior of arithmetic overflow in debug and release modes. Updated examples to emphasize the use of explicit wrapping and saturation semantics.
Copy link
Collaborator

@PLeVasseur PLeVasseur left a comment

Choose a reason for hiding this comment

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

LGTM, thanks @rcseacord

@PLeVasseur PLeVasseur added this pull request to the merge queue Dec 4, 2025
Merged via the queue into rustfoundation:main with commit 1b00276 Dec 4, 2025
6 checks passed
@rcseacord rcseacord deleted the feature/arithmetic-overflow branch December 4, 2025 14:27
@AlexCeleste
Copy link
Collaborator

Reviewed in session 2025-12-03

manhatsu pushed a commit to manhatsu/safety-critical-rust-coding-guidelines that referenced this pull request Dec 4, 2025
* new arithmetic overflow rule

* Update expressions.rst

fixed a bunch of small problems and started adding compliant solutions using saturation semantics

* Update expressions.rst

adding Wrapping<T> example

* Revise arithmetic overflow guidelines and examples

Revised guidelines on arithmetic overflow, emphasizing prevention and the use of explicit wrapping functions. Updated examples to reflect compliant practices with saturation semantics.

* Update src/coding-guidelines/expressions.rst

Co-authored-by: Félix Fischer <[email protected]>

* Update expressions.rst to specify integer types for overflow

Clarify guidelines on eliminating arithmetic overflow for various integer types.

* Update guidelines on arithmetic overflow handling

Clarify behavior of arithmetic overflow in Rust.

* Clarify arithmetic overflow behavior in expressions.rst

* rebase for fls errors

* Update src/coding-guidelines/expressions.rst

Co-authored-by: Félix Fischer <[email protected]>

* Apply suggestion from @rcseacord

* Clarify arithmetic overflow handling and examples

Clarified behavior of arithmetic overflow in debug and release modes. Updated examples to emphasize the use of explicit wrapping and saturation semantics.

* Update src/coding-guidelines/expressions.rst

Co-authored-by: Félix Fischer <[email protected]>

* Update src/coding-guidelines/expressions.rst

Co-authored-by: Félix Fischer <[email protected]>

* Update print statement format in Rust example

* Update src/coding-guidelines/expressions.rst

Co-authored-by: Félix Fischer <[email protected]>

* Update src/coding-guidelines/expressions.rst

Co-authored-by: Félix Fischer <[email protected]>

* Update src/coding-guidelines/expressions.rst

Co-authored-by: Félix Fischer <[email protected]>

* Update expressions.rst

---------

Co-authored-by: Félix Fischer <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chapter: expressions coding guideline An issue related to a suggestion for a coding guideline

Development

Successfully merging this pull request may close these issues.

4 participants