mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-30 03:57:37 +00:00
Remove feature gates for if let
, while let
, and tuple indexing
Closes #19469
This commit is contained in:
parent
3a325c666d
commit
c200ae5a8a
@ -65,13 +65,13 @@ static KNOWN_FEATURES: &'static [(&'static str, Status)] = &[
|
|||||||
("unboxed_closures", Active),
|
("unboxed_closures", Active),
|
||||||
("import_shadowing", Active),
|
("import_shadowing", Active),
|
||||||
("advanced_slice_patterns", Active),
|
("advanced_slice_patterns", Active),
|
||||||
("tuple_indexing", Active),
|
("tuple_indexing", Accepted),
|
||||||
("associated_types", Active),
|
("associated_types", Active),
|
||||||
("visible_private_types", Active),
|
("visible_private_types", Active),
|
||||||
("slicing_syntax", Active),
|
("slicing_syntax", Active),
|
||||||
|
|
||||||
("if_let", Active),
|
("if_let", Accepted),
|
||||||
("while_let", Active),
|
("while_let", Accepted),
|
||||||
|
|
||||||
// if you change this list without updating src/doc/reference.md, cmr will be sad
|
// if you change this list without updating src/doc/reference.md, cmr will be sad
|
||||||
|
|
||||||
@ -309,24 +309,11 @@ impl<'a, 'v> Visitor<'v> for Context<'a> {
|
|||||||
"unboxed closures are a work-in-progress \
|
"unboxed closures are a work-in-progress \
|
||||||
feature with known bugs");
|
feature with known bugs");
|
||||||
}
|
}
|
||||||
ast::ExprTupField(..) => {
|
|
||||||
self.gate_feature("tuple_indexing",
|
|
||||||
e.span,
|
|
||||||
"tuple indexing is experimental");
|
|
||||||
}
|
|
||||||
ast::ExprIfLet(..) => {
|
|
||||||
self.gate_feature("if_let", e.span,
|
|
||||||
"`if let` syntax is experimental");
|
|
||||||
}
|
|
||||||
ast::ExprSlice(..) => {
|
ast::ExprSlice(..) => {
|
||||||
self.gate_feature("slicing_syntax",
|
self.gate_feature("slicing_syntax",
|
||||||
e.span,
|
e.span,
|
||||||
"slicing syntax is experimental");
|
"slicing syntax is experimental");
|
||||||
}
|
}
|
||||||
ast::ExprWhileLet(..) => {
|
|
||||||
self.gate_feature("while_let", e.span,
|
|
||||||
"`while let` syntax is experimental");
|
|
||||||
}
|
|
||||||
_ => {}
|
_ => {}
|
||||||
}
|
}
|
||||||
visit::walk_expr(self, e);
|
visit::walk_expr(self, e);
|
||||||
|
@ -8,8 +8,6 @@
|
|||||||
// option. This file may not be copied, modified, or distributed
|
// option. This file may not be copied, modified, or distributed
|
||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
#![feature(tuple_indexing)]
|
|
||||||
|
|
||||||
struct Foo(Box<int>, int);
|
struct Foo(Box<int>, int);
|
||||||
|
|
||||||
struct Bar(int, int);
|
struct Bar(int, int);
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
// option. This file may not be copied, modified, or distributed
|
// option. This file may not be copied, modified, or distributed
|
||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
#![feature(macro_rules,if_let)]
|
#![feature(macro_rules)]
|
||||||
|
|
||||||
fn macros() {
|
fn macros() {
|
||||||
macro_rules! foo{
|
macro_rules! foo{
|
||||||
|
@ -8,8 +8,6 @@
|
|||||||
// option. This file may not be copied, modified, or distributed
|
// option. This file may not be copied, modified, or distributed
|
||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
#![feature(tuple_indexing)]
|
|
||||||
|
|
||||||
struct MyPtr<'a>(&'a mut uint);
|
struct MyPtr<'a>(&'a mut uint);
|
||||||
impl<'a> Deref<uint> for MyPtr<'a> {
|
impl<'a> Deref<uint> for MyPtr<'a> {
|
||||||
fn deref<'b>(&'b self) -> &'b uint { self.0 }
|
fn deref<'b>(&'b self) -> &'b uint { self.0 }
|
||||||
|
@ -8,8 +8,6 @@
|
|||||||
// option. This file may not be copied, modified, or distributed
|
// option. This file may not be copied, modified, or distributed
|
||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
#![feature(tuple_indexing)]
|
|
||||||
|
|
||||||
const TUP: (uint,) = (42,);
|
const TUP: (uint,) = (42,);
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
|
@ -9,7 +9,6 @@
|
|||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
#![deny(unused_parens)]
|
#![deny(unused_parens)]
|
||||||
#![feature(if_let,while_let)]
|
|
||||||
|
|
||||||
#[deriving(Eq, PartialEq)]
|
#[deriving(Eq, PartialEq)]
|
||||||
struct X { y: bool }
|
struct X { y: bool }
|
||||||
|
@ -8,8 +8,6 @@
|
|||||||
// option. This file may not be copied, modified, or distributed
|
// option. This file may not be copied, modified, or distributed
|
||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
#![feature(tuple_indexing)]
|
|
||||||
|
|
||||||
// Test that we correctly compute the move fragments for a fn.
|
// Test that we correctly compute the move fragments for a fn.
|
||||||
//
|
//
|
||||||
// Note that the code below is not actually incorrect; the
|
// Note that the code below is not actually incorrect; the
|
||||||
|
@ -8,8 +8,6 @@
|
|||||||
// option. This file may not be copied, modified, or distributed
|
// option. This file may not be copied, modified, or distributed
|
||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
#![feature(tuple_indexing)]
|
|
||||||
|
|
||||||
struct Foo(Box<int>);
|
struct Foo(Box<int>);
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
|
@ -8,8 +8,6 @@
|
|||||||
// option. This file may not be copied, modified, or distributed
|
// option. This file may not be copied, modified, or distributed
|
||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
#![feature(tuple_indexing)]
|
|
||||||
|
|
||||||
struct Point { x: int, y: int }
|
struct Point { x: int, y: int }
|
||||||
struct Empty;
|
struct Empty;
|
||||||
|
|
||||||
|
@ -8,8 +8,6 @@
|
|||||||
// option. This file may not be copied, modified, or distributed
|
// option. This file may not be copied, modified, or distributed
|
||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
#![feature(tuple_indexing)]
|
|
||||||
|
|
||||||
struct Point(int, int);
|
struct Point(int, int);
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
// option. This file may not be copied, modified, or distributed
|
// option. This file may not be copied, modified, or distributed
|
||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
#![feature(macro_rules,while_let)]
|
#![feature(macro_rules)]
|
||||||
|
|
||||||
fn macros() {
|
fn macros() {
|
||||||
macro_rules! foo{
|
macro_rules! foo{
|
||||||
|
Loading…
Reference in New Issue
Block a user