diff --git a/0000-template.md b/0000-template.md deleted file mode 100644 index a45c6110e..000000000 --- a/0000-template.md +++ /dev/null @@ -1,36 +0,0 @@ -- Feature Name: (fill me in with a unique ident, my_awesome_feature) -- Start Date: (fill me in with today's date, YYYY-MM-DD) -- RFC PR: (leave this empty) -- Rust Issue: (leave this empty) - -# Summary -[summary]: #summary - -One para explanation of the feature. - -# Motivation -[motivation]: #motivation - -Why are we doing this? What use cases does it support? What is the expected outcome? - -# Detailed design -[design]: #detailed-design - -This is the bulk of the RFC. Explain the design in enough detail for somebody familiar -with the language to understand, and for somebody familiar with the compiler to implement. -This should get into specifics and corner-cases, and include examples of how the feature is used. - -# Drawbacks -[drawbacks]: #drawbacks - -Why should we *not* do this? - -# Alternatives -[alternatives]: #alternatives - -What other designs have been considered? What is the impact of not doing this? - -# Unresolved questions -[unresolved]: #unresolved-questions - -What parts of the design are still TBD? diff --git a/text/0000-stable-overflow-checks.md b/text/0000-stable-overflow-checks.md new file mode 100644 index 000000000..2c0a27a17 --- /dev/null +++ b/text/0000-stable-overflow-checks.md @@ -0,0 +1,55 @@ +- Feature Name: (fill me in with a unique ident, my_awesome_feature) +- Start Date: (fill me in with today's date, YYYY-MM-DD) +- RFC PR: (leave this empty) +- Rust Issue: (leave this empty) + +# Summary +[summary]: #summary + +Stabilize the `-C overflow-checks` command line argument. + +# Motivation +[motivation]: #motivation + +This is an easy way to turn on overflow checks in release builds +without otherwise turning on debug assertions, via the `-C +debug-assertions` flag. In stable Rust today you can't get one without +the other. + +Users can use the `-C overflow-checks` flag from their Cargo +config to turn on overflow checks for an entire application. + +This flag, which accepts values of 'yes'/'no', 'on'/'off', is being +renamed from `force-overflow-checks` because the `force` doesn't add +anything that the 'yes'/'no' + +# Detailed design +[design]: #detailed-design + +This is a stabilization RFC. The only steps will be to move +`force-overflow-checks` from `-Z` to `-C`, renaming it to +`overflow-checks`, and making it stable. + +# Drawbacks +[drawbacks]: #drawbacks + +It's another rather ad-hoc flag for modifying code generation. + +Like other such flags, this applies to the entire code unit, +regardless of monomorphizations. This means that code generation for a +single function can be diferent based on which code unit its +instantiated in. + +# Alternatives +[alternatives]: #alternatives + +The flag could instead be tied to crates such that any time code from +that crate is inlined/monomorphized it turns on overflow checks. + +We might also want a design that provides per-function control over +overflow checks. + +# Unresolved questions +[unresolved]: #unresolved-questions + +None. \ No newline at end of file