Skip to content

Commit f84c765

Browse files
lilyballJakub Wieczorek
authored andcommitted
---
yaml --- r: 135249 b: refs/heads/snap-stage3 c: 8a60952 h: refs/heads/master i: 135247: 6d73149 v: v3
1 parent c70699e commit f84c765

File tree

7 files changed

+14
-3
lines changed

7 files changed

+14
-3
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: 74090504219e4e37c1a6d9fdd8600f44b51c7b04
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: 976438f78fdce8092430f4c81ca272293c48f1a0
4+
refs/heads/snap-stage3: 8a609521007c0c0c37d8d2396085631c08ad5232
55
refs/heads/try: 14378ea357c06c23607ca61ade44f60a7a64a1c7
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b

branches/snap-stage3/src/doc/reference.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2441,6 +2441,8 @@ The currently implemented features of the reference compiler are:
24412441
* `default_type_params` - Allows use of default type parameters. The future of
24422442
this feature is uncertain.
24432443

2444+
* `if_let` - Allows use of the `if let` desugaring syntax.
2445+
24442446
* `intrinsics` - Allows use of the "rust-intrinsics" ABI. Compiler intrinsics
24452447
are inherently unstable and no promise about them is made.
24462448

branches/snap-stage3/src/doc/rust.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
% The Rust Reference Manual
22

3-
The manual has moved, and is now called [the reference](reference.html).
3+
The manual has moved, and is now called [the reference](reference.html).

branches/snap-stage3/src/libsyntax/feature_gate.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,8 @@ static KNOWN_FEATURES: &'static [(&'static str, Status)] = &[
7171
("associated_types", Active),
7272
("visible_private_types", Active),
7373

74+
("if_let", Active),
75+
7476
// if you change this list without updating src/doc/rust.md, cmr will be sad
7577

7678
// A temporary feature gate used to enable parser extensions needed
@@ -356,6 +358,10 @@ impl<'a, 'v> Visitor<'v> for Context<'a> {
356358
e.span,
357359
"tuple indexing is experimental");
358360
}
361+
ast::ExprIfLet(..) => {
362+
self.gate_feature("if_let", e.span,
363+
"`if let` desugaring is experimental");
364+
}
359365
_ => {}
360366
}
361367
visit::walk_expr(self, e);

branches/snap-stage3/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)]
11+
#![feature(macro_rules,if_let)]
1212

1313
fn macros() {
1414
macro_rules! foo{

branches/snap-stage3/src/test/compile-fail/lint-unnecessary-parens.rs

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

1111
#![deny(unnecessary_parens)]
12+
#![feature(if_let)]
1213

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

branches/snap-stage3/src/test/run-pass/if-let.rs

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

11+
#![feature(if_let)]
12+
1113
pub fn main() {
1214
let x = Some(3i);
1315
if let Some(y) = x {

0 commit comments

Comments
 (0)