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

Rules for const safety and promotion #6

Merged
merged 3 commits into from
Aug 30, 2018

Conversation

RalfJung
Copy link
Member

Based on my blog posts and lots of prior discussion with @oli-obk and @eddyb. I am sure I forgot some of that discussion though, so please let me know what is wrong or missing.^^

@RalfJung RalfJung mentioned this pull request Aug 29, 2018
@RalfJung
Copy link
Member Author

I significantly expanded the discussion of promotion, also covering the concerns raised in #2.

const_safety.md Outdated
pointer).
* The program panics (e.g., a failed bounds check).
* The program loops forever, and this is detected by the loop detector.
Copy link
Contributor

Choose a reason for hiding this comment

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

On a best effort basis. We basically don't care too much about nontermination except for diagnostics

Copy link
Member Author

Choose a reason for hiding this comment

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

AFAIK we do error hard if we detect a reoccurring state? This could happen in a promoted as well.

@RalfJung
Copy link
Member Author

Note that while the promoted.md contains some TODOs, I think we don't have to wait merging this until the TODOs are figured out -- it's still strictly more informative than what we have now. ;)

@oli-obk oli-obk merged commit cb97a08 into rust-lang:master Aug 30, 2018
@RalfJung RalfJung deleted the const-safety-and-promotion branch August 18, 2019 09:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants