Rename feature gate

This commit is contained in:
Christian Poveda 2019-11-21 12:38:14 -05:00
parent 8b0f5acfcb
commit d24ae2577f
4 changed files with 4 additions and 4 deletions

View file

@ -528,7 +528,7 @@ declare_features! (
(active, cfg_sanitize, "1.41.0", Some(39699), None),
/// Allows using `&mut` in constant functions.
(active, const_fn_mut_refs, "1.41.0", None, None),
(active, const_mut_refs, "1.41.0", Some(57349), None),
// -------------------------------------------------------------------------
// feature-group-end: actual feature gates

View file

@ -81,7 +81,7 @@ fn check_ty(tcx: TyCtxt<'tcx>, ty: Ty<'tcx>, span: Span, fn_def_id: DefId) -> Mc
for ty in ty.walk() {
match ty.kind {
ty::Ref(_, _, hir::Mutability::Mutable) => {
if !tcx.features().const_fn_mut_refs {
if !tcx.features().const_mut_refs {
return Err((
span,
"mutable references in const fn are unstable".into(),

View file

@ -203,13 +203,13 @@ symbols! {
const_constructor,
const_extern_fn,
const_fn,
const_fn_mut_refs,
const_fn_union,
const_generics,
const_if_match,
const_indexing,
const_in_array_repeat_expressions,
const_let,
const_mut_refs,
const_panic,
const_raw_ptr_deref,
const_raw_ptr_to_usize_cast,

View file

@ -1,6 +1,6 @@
// run-pass
#![feature(const_fn_mut_refs)]
#![feature(const_mut_refs)]
struct Foo {
x: i32