Remove fn from feature name

This commit is contained in:
Dylan MacKenzie 2020-10-05 20:30:13 -07:00
parent af03b1143e
commit c4ef5fdf8f
10 changed files with 12 additions and 12 deletions

View File

@ -597,7 +597,7 @@ declare_features! (
(active, default_alloc_error_handler, "1.48.0", Some(66741), None),
/// Allows argument and return position `impl Trait` in a `const fn`.
(active, const_fn_impl_trait, "1.48.0", Some(77463), None),
(active, const_impl_trait, "1.48.0", Some(77463), None),
// -------------------------------------------------------------------------
// feature-group-end: actual feature gates

View File

@ -562,14 +562,14 @@ pub mod ty {
if ccx.const_kind() != hir::ConstContext::ConstFn {
Status::Allowed
} else {
Status::Unstable(sym::const_fn_impl_trait)
Status::Unstable(sym::const_impl_trait)
}
}
fn build_error(&self, ccx: &ConstCx<'_, 'tcx>, span: Span) -> DiagnosticBuilder<'tcx> {
feature_err(
&ccx.tcx.sess.parse_sess,
sym::const_fn_impl_trait,
sym::const_impl_trait,
span,
&format!("`impl Trait` is not allowed in {}s", ccx.const_kind()),
)

View File

@ -355,11 +355,11 @@ symbols! {
const_fn,
const_fn_floating_point_arithmetic,
const_fn_fn_ptr_basics,
const_fn_impl_trait,
const_fn_transmute,
const_fn_union,
const_generics,
const_if_match,
const_impl_trait,
const_in_array_repeat_expressions,
const_indexing,
const_let,

View File

@ -83,7 +83,7 @@
#![feature(const_fn)]
#![feature(const_fn_union)]
#![feature(const_assume)]
#![cfg_attr(not(bootstrap), feature(const_fn_impl_trait))]
#![cfg_attr(not(bootstrap), feature(const_impl_trait))]
#![cfg_attr(not(bootstrap), feature(const_fn_floating_point_arithmetic))]
#![cfg_attr(not(bootstrap), feature(const_fn_fn_ptr_basics))]
#![feature(const_generics)]

View File

@ -1,4 +1,4 @@
// gate-test-const_fn_impl_trait
// gate-test-const_impl_trait
struct AlanTuring<T>(T);
const fn no_rpit2() -> AlanTuring<impl std::fmt::Debug> { //~ `impl Trait`

View File

@ -5,7 +5,7 @@ LL | const fn no_rpit2() -> AlanTuring<impl std::fmt::Debug> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: see issue #77463 <https://github.com/rust-lang/rust/issues/77463> for more information
= help: add `#![feature(const_fn_impl_trait)]` to the crate attributes to enable
= help: add `#![feature(const_impl_trait)]` to the crate attributes to enable
error[E0658]: `impl Trait` is not allowed in constant functions
--> $DIR/min_const_fn_impl_trait.rs:8:23
@ -14,7 +14,7 @@ LL | const fn no_rpit() -> impl std::fmt::Debug {}
| ^^^^^^^^^^^^^^^^^^^^
|
= note: see issue #77463 <https://github.com/rust-lang/rust/issues/77463> for more information
= help: add `#![feature(const_fn_impl_trait)]` to the crate attributes to enable
= help: add `#![feature(const_impl_trait)]` to the crate attributes to enable
error: aborting due to 2 previous errors

View File

@ -1,5 +1,5 @@
// check-pass
#![feature(const_fn_impl_trait, const_fn_fn_ptr_basics)]
#![feature(const_impl_trait, const_fn_fn_ptr_basics)]
#![feature(type_alias_impl_trait)]
type Foo = impl Fn() -> usize;

View File

@ -1,6 +1,6 @@
// check-pass
#![feature(const_fn_impl_trait, generators, generator_trait, type_alias_impl_trait)]
#![feature(const_impl_trait, generators, generator_trait, type_alias_impl_trait)]
use std::ops::Generator;

View File

@ -1,4 +1,4 @@
#![feature(const_fn_impl_trait, type_alias_impl_trait)]
#![feature(const_impl_trait, type_alias_impl_trait)]
type Bar = impl Send;

View File

@ -1,4 +1,4 @@
#![feature(const_fn_impl_trait, type_alias_impl_trait)]
#![feature(const_impl_trait, type_alias_impl_trait)]
type Foo = impl Send;