Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit e495b37

Browse files
committedOct 10, 2022
Auto merge of rust-lang#102867 - JohnTitor:rollup-qnwsajt, r=JohnTitor
Rollup of 6 pull requests Successful merges: - rust-lang#102275 (Stabilize `half_open_range_patterns`) - rust-lang#102323 (Trying to suggest additional lifetime parameter) - rust-lang#102345 (Recover from impl Trait in type param bound) - rust-lang#102845 (Elaborate trait ref to compute object safety.) - rust-lang#102860 (Add missing documentation for FileNameDisplayPreference variants) - rust-lang#102862 (From<Alignment> for usize & NonZeroUsize) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2 parents 1a7c203 + 6d35efe commit e495b37

File tree

65 files changed

+507
-442
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+507
-442
lines changed
 

‎compiler/rustc_ast_passes/src/feature_gate.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,7 @@ impl<'a> Visitor<'a> for PostExpansionVisitor<'a> {
461461
if let PatKind::Range(Some(_), None, Spanned { .. }) = inner_pat.kind {
462462
gate_feature_post!(
463463
&self,
464-
half_open_range_patterns,
464+
half_open_range_patterns_in_slices,
465465
pat.span,
466466
"`X..` patterns in slices are experimental"
467467
);
@@ -589,7 +589,10 @@ pub fn check_crate(krate: &ast::Crate, sess: &Session) {
589589
gate_all!(generators, "yield syntax is experimental");
590590
gate_all!(raw_ref_op, "raw address of syntax is experimental");
591591
gate_all!(const_trait_impl, "const trait impls are experimental");
592-
gate_all!(half_open_range_patterns, "half-open range patterns are unstable");
592+
gate_all!(
593+
half_open_range_patterns_in_slices,
594+
"half-open range patterns in slices are unstable"
595+
);
593596
gate_all!(inline_const, "inline-const is experimental");
594597
gate_all!(inline_const_pat, "inline-const in pattern position is experimental");
595598
gate_all!(associated_const_equality, "associated const equality is incomplete");

‎compiler/rustc_feature/src/accepted.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,8 @@ declare_features! (
169169
(accepted, global_allocator, "1.28.0", Some(27389), None),
170170
// FIXME: explain `globs`.
171171
(accepted, globs, "1.0.0", None, None),
172+
/// Allows using `..=X` as a pattern.
173+
(accepted, half_open_range_patterns, "CURRENT_RUSTC_VERSION", Some(67264), None),
172174
/// Allows using the `u128` and `i128` types.
173175
(accepted, i128_type, "1.26.0", Some(35118), None),
174176
/// Allows the use of `if let` expressions.

0 commit comments

Comments
 (0)
Please sign in to comment.