Skip to content

Commit 9a507a5

Browse files
committed
---
yaml --- r: 272826 b: refs/heads/beta c: 37a4cb3 h: refs/heads/master
1 parent 7fb6547 commit 9a507a5

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ refs/tags/0.9: 36870b185fc5f5486636d4515f0e22677493f225
2323
refs/tags/0.10: ac33f2b15782272ae348dbd7b14b8257b2148b5a
2424
refs/tags/0.11.0: e1247cb1d0d681be034adb4b558b5a0c0d5720f9
2525
refs/tags/0.12.0: f0c419429ef30723ceaf6b42f9b5a2aeb5d2e2d1
26-
refs/heads/beta: bd3197c748e7bfa652fb636fbb78fa7a42d826ca
26+
refs/heads/beta: 37a4cb32121bed9165f9bac696953f055f691aef
2727
refs/tags/1.0.0-alpha: e42bd6d93a1d3433c486200587f8f9e12590a4d7
2828
refs/heads/tmp: e06d2ad9fcd5027bcaac5b08fc9aa39a49d0ecd3
2929
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f

branches/beta/src/libsyntax/feature_gate.rs

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,10 @@ const KNOWN_FEATURES: &'static [(&'static str, &'static str, Option<u32>, Status
241241
("cfg_target_thread_local", "1.7.0", Some(29594), Active),
242242

243243
// rustc internal
244-
("abi_vectorcall", "1.7.0", None, Active)
244+
("abi_vectorcall", "1.7.0", None, Active),
245+
246+
// a...b and ...b
247+
("inclusive_range_syntax", "1.7.0", Some(28237), Active),
245248
];
246249
// (changing above list without updating src/doc/reference.md makes @cmr sad)
247250

@@ -549,6 +552,7 @@ pub struct Features {
549552
pub allow_placement_in: bool,
550553
pub allow_box: bool,
551554
pub allow_pushpop_unsafe: bool,
555+
pub allow_inclusive_range: bool,
552556
pub simd_ffi: bool,
553557
pub unmarked_api: bool,
554558
/// spans of #![feature] attrs for stable language features. for error reporting
@@ -585,6 +589,7 @@ impl Features {
585589
allow_placement_in: false,
586590
allow_box: false,
587591
allow_pushpop_unsafe: false,
592+
allow_inclusive_range: false,
588593
simd_ffi: false,
589594
unmarked_api: false,
590595
declared_stable_lang_features: Vec::new(),
@@ -998,6 +1003,11 @@ impl<'a, 'v> Visitor<'v> for PostExpansionVisitor<'a> {
9981003
self.gate_feature("type_ascription", e.span,
9991004
"type ascription is experimental");
10001005
}
1006+
ast::ExprRange(_, _, ast::RangeLimits::Closed) => {
1007+
self.gate_feature("inclusive_range_syntax",
1008+
e.span,
1009+
"inclusive range syntax is experimental");
1010+
}
10011011
_ => {}
10021012
}
10031013
visit::walk_expr(self, e);
@@ -1184,6 +1194,7 @@ fn check_crate_inner<F>(cm: &CodeMap, span_handler: &Handler,
11841194
allow_placement_in: cx.has_feature("placement_in_syntax"),
11851195
allow_box: cx.has_feature("box_syntax"),
11861196
allow_pushpop_unsafe: cx.has_feature("pushpop_unsafe"),
1197+
allow_inclusive_range: cx.has_feature("inclusive_range_syntax"),
11871198
simd_ffi: cx.has_feature("simd_ffi"),
11881199
unmarked_api: cx.has_feature("unmarked_api"),
11891200
declared_stable_lang_features: accepted_features,

0 commit comments

Comments
 (0)