Skip to content

Commit 06c2250

Browse files
committed
Merge branch 'alexcrichton-un-feature-gate-some-more-gates'
2 parents 138a079 + 6222175 commit 06c2250

File tree

2 files changed

+57
-0
lines changed

2 files changed

+57
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ the direction the language is evolving in.
5353
* [0430-finalizing-naming-conventions.md](text/0430-finalizing-naming-conventions.md)
5454
* [0438-precedence-of-plus.md](text/0438-precedence-of-plus.md)
5555
* [0439-cmp-ops-reform.md](text/0439-cmp-ops-reform.md)
56+
* [0450-un-feature-gate-some-more-gates.md](text/0450-un-feature-gate-some-more-gates.md)
5657
* [0459-disallow-shadowing.md](text/0459-disallow-shadowing.md)
5758
* [0463-future-proof-literal-suffixes.md](text/0463-future-proof-literal-suffixes.md)
5859

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
- Start Date: 2014-12-02
2+
- RFC PR: [450](https://github.com/rust-lang/rfcs/pull/450)
3+
- Rust Issue: [19469](https://github.com/rust-lang/rust/issues/19469)
4+
5+
# Summary
6+
7+
Remove the `tuple_indexing`, `if_let`, and `while_let` feature gates and add
8+
them to the language.
9+
10+
# Motivation
11+
12+
## Tuple Indexing
13+
14+
This feature has proven to be quite useful for tuples and struct variants, and
15+
it allows for the removal of some unnecessary tuple accessing traits in the
16+
standard library (TupleN).
17+
18+
The implementation has also proven to be quite solid with very few reported
19+
internal compiler errors related to this feature.
20+
21+
## `if let` and `while let`
22+
23+
This feature has also proven to be quite useful over time. Many projects are now
24+
leveraging these feature gates which is a testament to their usefulness.
25+
26+
Additionally, the implementation has also proven to be quite solid with very
27+
few reported internal compiler errors related to this feature.
28+
29+
# Detailed design
30+
31+
* Remove the `if_let`, `while_let`, and `tuple_indexing` feature gates.
32+
* Add these features to the language (do not require a feature gate to use them).
33+
* Deprecate the `TupleN` traits in `std::tuple`.
34+
35+
# Drawbacks
36+
37+
Adding features to the language this late in the game is always somewhat of a
38+
risky business. These features, while having baked for a few weeks, haven't had
39+
much time to bake in the grand scheme of the language. These are both backwards
40+
compatible to accept, and it could be argued that this could be done later
41+
rather than sooner.
42+
43+
In general, the major drawbacks of this RFC are the scheduling risks and
44+
"feature bloat" worries. This RFC, however, is quite easy to implement (reducing
45+
schedule risk) and concerns two fairly minor features which are unambiguously
46+
nice to have.
47+
48+
# Alternatives
49+
50+
* Instead of un-feature-gating before 1.0, these features could be released
51+
after 1.0 (if at all). The `TupleN` traits would then be required to be
52+
deprecated for the entire 1.0 release cycle.
53+
54+
# Unresolved questions
55+
56+
None at the moment.

0 commit comments

Comments
 (0)