Skip to content

Commit c200ae5

Browse files
committed
Remove feature gates for if let, while let, and tuple indexing
Closes #19469
1 parent 3a325c6 commit c200ae5

11 files changed

+5
-33
lines changed

src/libsyntax/feature_gate.rs

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -65,13 +65,13 @@ static KNOWN_FEATURES: &'static [(&'static str, Status)] = &[
6565
("unboxed_closures", Active),
6666
("import_shadowing", Active),
6767
("advanced_slice_patterns", Active),
68-
("tuple_indexing", Active),
68+
("tuple_indexing", Accepted),
6969
("associated_types", Active),
7070
("visible_private_types", Active),
7171
("slicing_syntax", Active),
7272

73-
("if_let", Active),
74-
("while_let", Active),
73+
("if_let", Accepted),
74+
("while_let", Accepted),
7575

7676
// if you change this list without updating src/doc/reference.md, cmr will be sad
7777

@@ -309,24 +309,11 @@ impl<'a, 'v> Visitor<'v> for Context<'a> {
309309
"unboxed closures are a work-in-progress \
310310
feature with known bugs");
311311
}
312-
ast::ExprTupField(..) => {
313-
self.gate_feature("tuple_indexing",
314-
e.span,
315-
"tuple indexing is experimental");
316-
}
317-
ast::ExprIfLet(..) => {
318-
self.gate_feature("if_let", e.span,
319-
"`if let` syntax is experimental");
320-
}
321312
ast::ExprSlice(..) => {
322313
self.gate_feature("slicing_syntax",
323314
e.span,
324315
"slicing syntax is experimental");
325316
}
326-
ast::ExprWhileLet(..) => {
327-
self.gate_feature("while_let", e.span,
328-
"`while let` syntax is experimental");
329-
}
330317
_ => {}
331318
}
332319
visit::walk_expr(self, e);

src/test/compile-fail/borrow-tuple-fields.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
#![feature(tuple_indexing)]
12-
1311
struct Foo(Box<int>, int);
1412

1513
struct Bar(int, int);

src/test/compile-fail/if-let.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
#![feature(macro_rules,if_let)]
11+
#![feature(macro_rules)]
1212

1313
fn macros() {
1414
macro_rules! foo{

src/test/compile-fail/issue-18566.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
#![feature(tuple_indexing)]
12-
1311
struct MyPtr<'a>(&'a mut uint);
1412
impl<'a> Deref<uint> for MyPtr<'a> {
1513
fn deref<'b>(&'b self) -> &'b uint { self.0 }

src/test/compile-fail/issue-19244-1.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
#![feature(tuple_indexing)]
12-
1311
const TUP: (uint,) = (42,);
1412

1513
fn main() {

src/test/compile-fail/lint-unnecessary-parens.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
// except according to those terms.
1010

1111
#![deny(unused_parens)]
12-
#![feature(if_let,while_let)]
1312

1413
#[deriving(Eq, PartialEq)]
1514
struct X { y: bool }

src/test/compile-fail/move-fragments-1.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
#![feature(tuple_indexing)]
12-
1311
// Test that we correctly compute the move fragments for a fn.
1412
//
1513
// Note that the code below is not actually incorrect; the

src/test/compile-fail/move-out-of-tuple-field.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
#![feature(tuple_indexing)]
12-
1311
struct Foo(Box<int>);
1412

1513
fn main() {

src/test/compile-fail/tuple-index-not-tuple.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
#![feature(tuple_indexing)]
12-
1311
struct Point { x: int, y: int }
1412
struct Empty;
1513

src/test/compile-fail/tuple-index-out-of-bounds.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
#![feature(tuple_indexing)]
12-
1311
struct Point(int, int);
1412

1513
fn main() {

src/test/compile-fail/while-let.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
#![feature(macro_rules,while_let)]
11+
#![feature(macro_rules)]
1212

1313
fn macros() {
1414
macro_rules! foo{

0 commit comments

Comments
 (0)