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

Assert by level #3647

Closed
graydon opened this issue Oct 3, 2012 · 6 comments
Closed

Assert by level #3647

graydon opened this issue Oct 3, 2012 · 6 comments
Labels
E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. P-low Low priority

Comments

@graydon
Copy link
Contributor

graydon commented Oct 3, 2012

Given the current (and potentially permanent) absence of typestate, enabling and disabling assertions by severity is a more reasonable requirement. Some assertions make more sense when in testing than in production. We should support (when we switch assertions to macros / library calls) passing a "level" parameter the same way the logging system can be parameterized by level.

@ghost ghost assigned graydon Oct 3, 2012
@pcwalton
Copy link
Contributor

I don't think this is necessarily backwards incompatible. Given that assertions are now macros, we have a lot of flexibility to beef up the syntax in backwards-compatible ways. Nominating for some other milestone.

@brson
Copy link
Contributor

brson commented Jun 27, 2013

note that logging is no longer parameterized by level - we have separate macros for each

@pnkfelix
Copy link
Member

accepted for production ready

@emberian
Copy link
Member

/cc @huonw, #7869

@pnkfelix
Copy link
Member

Assigning P-low.

@thestinger
Copy link
Contributor

I think this is too out-of-date so I've opened #12049. I think we only need to distinguish between upholding invariants and sanity checks.

@graydon graydon removed their assignment Jun 16, 2014
RalfJung pushed a commit to RalfJung/rust that referenced this issue Jun 9, 2024
Fix futex with large timeout ICE

Fixes rust-lang#3647.

This PR changed the type of ``nanoseconds`` from ``u64`` to ``u128``. In ``duration_since``, nanoseconds is manually converted to second by dividing it with 1e9. But overflow is still possible.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. P-low Low priority
Projects
None yet
Development

No branches or pull requests

6 participants