diff options
Diffstat (limited to 'compiler')
| -rw-r--r-- | compiler/rustc_feature/src/active.rs | 4 | ||||
| -rw-r--r-- | compiler/rustc_hir_typeck/src/pat.rs | 2 | ||||
| -rw-r--r-- | compiler/rustc_mir_build/src/build/matches/test.rs | 4 | ||||
| -rw-r--r-- | compiler/rustc_span/src/symbol.rs | 2 |
4 files changed, 6 insertions, 6 deletions
diff --git a/compiler/rustc_feature/src/active.rs b/compiler/rustc_feature/src/active.rs index 3a1db1193b3..ae49a76a087 100644 --- a/compiler/rustc_feature/src/active.rs +++ b/compiler/rustc_feature/src/active.rs @@ -376,8 +376,6 @@ declare_features! ( (active, deprecated_safe, "1.61.0", Some(94978), None), /// Allows having using `suggestion` in the `#[deprecated]` attribute. (active, deprecated_suggestion, "1.61.0", Some(94785), None), - /// Allows patterns to dereference values to match them. - (active, deref_patterns, "1.64.0", Some(87121), None), /// Tells rustdoc to automatically generate `#[doc(cfg(...))]`. (active, doc_auto_cfg, "1.58.0", Some(43781), None), /// Allows `#[doc(cfg(...))]`. @@ -508,6 +506,8 @@ declare_features! ( (active, stmt_expr_attributes, "1.6.0", Some(15701), None), /// Allows lints part of the strict provenance effort. (active, strict_provenance, "1.61.0", Some(95228), None), + /// Allows string patterns to dereference values to match them. + (active, string_deref_patterns, "CURRENT_RUSTC_VERSION", Some(87121), None), /// Allows the use of `#[target_feature]` on safe functions. (active, target_feature_11, "1.45.0", Some(69098), None), /// Allows using `#[thread_local]` on `static` items. diff --git a/compiler/rustc_hir_typeck/src/pat.rs b/compiler/rustc_hir_typeck/src/pat.rs index b20949bcbd5..4e3194501dc 100644 --- a/compiler/rustc_hir_typeck/src/pat.rs +++ b/compiler/rustc_hir_typeck/src/pat.rs @@ -401,7 +401,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> { } } - if self.tcx.features().deref_patterns && let hir::ExprKind::Lit(Spanned { node: ast::LitKind::Str(..), .. }) = lt.kind { + if self.tcx.features().string_deref_patterns && let hir::ExprKind::Lit(Spanned { node: ast::LitKind::Str(..), .. }) = lt.kind { let tcx = self.tcx; let expected = self.resolve_vars_if_possible(expected); pat_ty = match expected.kind() { diff --git a/compiler/rustc_mir_build/src/build/matches/test.rs b/compiler/rustc_mir_build/src/build/matches/test.rs index e6c01b72b1b..af0d7879c57 100644 --- a/compiler/rustc_mir_build/src/build/matches/test.rs +++ b/compiler/rustc_mir_build/src/build/matches/test.rs @@ -242,8 +242,8 @@ impl<'a, 'tcx> Builder<'a, 'tcx> { TestKind::Eq { value, ty } => { let tcx = self.tcx; if let ty::Adt(def, _) = ty.kind() && Some(def.did()) == tcx.lang_items().string() { - if !tcx.features().deref_patterns { - bug!("matching on `String` went through without enabling deref_patterns"); + if !tcx.features().string_deref_patterns { + bug!("matching on `String` went through without enabling string_deref_patterns"); } let re_erased = tcx.lifetimes.re_erased; let ref_string = self.temp(tcx.mk_imm_ref(re_erased, ty), test.span); diff --git a/compiler/rustc_span/src/symbol.rs b/compiler/rustc_span/src/symbol.rs index a06e613b82f..ec393ce5030 100644 --- a/compiler/rustc_span/src/symbol.rs +++ b/compiler/rustc_span/src/symbol.rs @@ -597,7 +597,6 @@ symbols! { deref, deref_method, deref_mut, - deref_patterns, deref_target, derive, derive_const, @@ -1406,6 +1405,7 @@ symbols! { str_trim_end, str_trim_start, strict_provenance, + string_deref_patterns, stringify, struct_field_attributes, struct_inherit, |
