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

Officially rename '%' from mod() into rem() in traits and docs #4917

Closed
Kimundi opened this issue Feb 13, 2013 · 2 comments
Closed

Officially rename '%' from mod() into rem() in traits and docs #4917

Kimundi opened this issue Feb 13, 2013 · 2 comments
Labels
A-lint Area: Lints (warnings about flaws in source code) such as unused_mut. C-cleanup Category: PRs that clean code up or issues documenting cleanup. E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.

Comments

@Kimundi
Copy link
Member

Kimundi commented Feb 13, 2013

Rusts % operator mimics C and C++ in that it's not modulo but remainder. This behavior should probably not be changed, however the documentation and naming convention should make it clear that it's the remainder operation.

@graydon
Copy link
Contributor

graydon commented Apr 22, 2013

Did #5990 fix this?

@thestinger
Copy link
Contributor

The % operator is now correctly called rem since that's the fast operation. The slower wrapper can be implemented on top of it and correctly called modulo since the method isn't taken anymore.

tesuji pushed a commit to tesuji/rustc that referenced this issue Jun 4, 2020
Add regression test for endless loop / update `pulldown_cmark`

Closes rust-lang#4917

This was fixed in pulldown_cmark 0.7.1, specifically pulldown-cmark/pulldown-cmark#438

changelog: none
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-lint Area: Lints (warnings about flaws in source code) such as unused_mut. C-cleanup Category: PRs that clean code up or issues documenting cleanup. E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
Projects
None yet
Development

No branches or pull requests

3 participants