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

rename assert! and assert_eq! to reflect that they uphold an invariant #12049

Closed
thestinger opened this issue Feb 5, 2014 · 2 comments
Closed
Labels
I-compiletime Issue: Problems and improvements with respect to compile times.
Milestone

Comments

@thestinger
Copy link
Contributor

These are not traditional assertions used for sanity checking that are optimized out in release builds. There are cases such as the asserts in std::cell::RefCell that are performing a useful sanity check, but should not be in a release build. By renaming these, we can make room for more traditional assertions.

I would suggest enforce!(condition) and enforce_eq!(a, b).

huonw added a commit to huonw/rust that referenced this issue Feb 22, 2014
…s_eq`.

These macros are always enabled so there's no particular need to fly in
the face of established convention where assertions are removed in
production code.

Closes rust-lang#12049.
@pcwalton
Copy link
Contributor

Nominating for backcompat-libs, see also rust-lang/rfcs#50

@brson brson added this to the 1.0 milestone Apr 25, 2014
@brson
Copy link
Contributor

brson commented Apr 25, 2014

Assigning P-backcompat-libs, 1.0.

flip1995 pushed a commit to flip1995/rust that referenced this issue Jan 11, 2024
fix/issue#11243: allow 3-digit-grouped binary in non_octal_unix_permissions

fixes [Issue#11243](rust-lang/rust-clippy#11243)

Issue#11243 suggest lint `non_octal_unix_permissions` should not report binary format literal unix permissions as an error, and we think binary format is a good way to understand these permissions.

To solve this problem, we need to add check for binary literal, which is written in function `check_binary_unix_permissions` , only `binary, 3 groups and each group length equals to 3` is a legal format.

changelog: [`non_octal_unix_permissions`]: Add check for binary format literal unix permissions like 0b111_111_111
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
I-compiletime Issue: Problems and improvements with respect to compile times.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants