abi::Abi::Rust if tcx.is_min_const_fn(def_id) => {},
abi::Abi::Rust => return Err((
span,
- "can only call other `min_const_fn` within a `min_const_fn`".into(),
+ "can only call other `const` within a `const`".into(),
)),
abi => return Err((
span,
#[stable(feature = "rust1", since = "1.0.0")]
// can't call non-min_const_fn
-const fn bar() -> u32 { foo() } //~ ERROR can only call other `min_const_fn`
+const fn bar() -> u32 { foo() } //~ ERROR can only call other `const`
#[unstable(feature = "rust1", issue="0")]
const fn foo2() -> u32 { 42 }
#[stable(feature = "rust1", since = "1.0.0")]
// can't call non-min_const_fn
-const fn bar2() -> u32 { foo2() } //~ ERROR can only call other `min_const_fn`
+const fn bar2() -> u32 { foo2() } //~ ERROR can only call other `const`
#[stable(feature = "rust1", since = "1.0.0")]
// conformity is required, even with `const_fn` feature gate
#[stable(feature = "rust1", since = "1.0.0")]
// can't call non-min_const_fn
-const fn bar2_gated() -> u32 { foo2_gated() } //~ ERROR can only call other `min_const_fn`
+const fn bar2_gated() -> u32 { foo2_gated() } //~ ERROR can only call other `const`
fn main() {}
-error[E0723]: can only call other `min_const_fn` within a `min_const_fn` (see issue #57563)
+error[E0723]: can only call other `const` within a `const` (see issue #57563)
--> $DIR/min_const_fn_libstd_stability.rs:15:25
|
LL | const fn bar() -> u32 { foo() }
|
= help: add #![feature(const_fn)] to the crate attributes to enable
-error[E0723]: can only call other `min_const_fn` within a `min_const_fn` (see issue #57563)
+error[E0723]: can only call other `const` within a `const` (see issue #57563)
--> $DIR/min_const_fn_libstd_stability.rs:22:26
|
LL | const fn bar2() -> u32 { foo2() }
|
= help: add #![feature(const_fn)] to the crate attributes to enable
-error[E0723]: can only call other `min_const_fn` within a `min_const_fn` (see issue #57563)
+error[E0723]: can only call other `const` within a `const` (see issue #57563)
--> $DIR/min_const_fn_libstd_stability.rs:34:32
|
LL | const fn bar2_gated() -> u32 { foo2_gated() }
#[stable(feature = "rust1", since = "1.0.0")]
// can't call non-min_const_fn
-const unsafe fn bar() -> u32 { unsafe { foo() } } //~ ERROR can only call other `min_const_fn`
+const unsafe fn bar() -> u32 { unsafe { foo() } } //~ ERROR can only call other `const`
#[unstable(feature = "rust1", issue="0")]
const unsafe fn foo2() -> u32 { 42 }
#[stable(feature = "rust1", since = "1.0.0")]
// can't call non-min_const_fn
-const unsafe fn bar2() -> u32 { unsafe { foo2() } } //~ ERROR can only call other `min_const_fn`
+const unsafe fn bar2() -> u32 { unsafe { foo2() } } //~ ERROR can only call other `const`
#[stable(feature = "rust1", since = "1.0.0")]
// conformity is required, even with `const_fn` feature gate
-error[E0723]: can only call other `min_const_fn` within a `min_const_fn` (see issue #57563)
+error[E0723]: can only call other `const` within a `const` (see issue #57563)
--> $DIR/min_const_unsafe_fn_libstd_stability.rs:15:41
|
LL | const unsafe fn bar() -> u32 { unsafe { foo() } }
|
= help: add #![feature(const_fn)] to the crate attributes to enable
-error[E0723]: can only call other `min_const_fn` within a `min_const_fn` (see issue #57563)
+error[E0723]: can only call other `const` within a `const` (see issue #57563)
--> $DIR/min_const_unsafe_fn_libstd_stability.rs:22:42
|
LL | const unsafe fn bar2() -> u32 { unsafe { foo2() } }
|
= help: add #![feature(const_fn)] to the crate attributes to enable
-error[E0723]: can only call other `min_const_fn` within a `min_const_fn` (see issue #57563)
+error[E0723]: can only call other `const` within a `const` (see issue #57563)
--> $DIR/min_const_unsafe_fn_libstd_stability.rs:34:48
|
LL | const unsafe fn bar2_gated() -> u32 { unsafe { foo2_gated() } }
#[stable(feature = "rust1", since = "1.0.0")]
// can't call non-min_const_fn
-const unsafe fn bar() -> u32 { foo() } //~ ERROR can only call other `min_const_fn`
+const unsafe fn bar() -> u32 { foo() } //~ ERROR can only call other `const`
#[unstable(feature = "rust1", issue="0")]
const fn foo2() -> u32 { 42 }
#[stable(feature = "rust1", since = "1.0.0")]
// can't call non-min_const_fn
-const unsafe fn bar2() -> u32 { foo2() } //~ ERROR can only call other `min_const_fn`
+const unsafe fn bar2() -> u32 { foo2() } //~ ERROR can only call other `const`
// check whether this function cannot be called even with the feature gate active
#[unstable(feature = "foo2", issue="0")]
#[stable(feature = "rust1", since = "1.0.0")]
// can't call non-min_const_fn
-const unsafe fn bar2_gated() -> u32 { foo2_gated() } //~ ERROR can only call other `min_const_fn`
+const unsafe fn bar2_gated() -> u32 { foo2_gated() } //~ ERROR can only call other `const`
fn main() {}
-error[E0723]: can only call other `min_const_fn` within a `min_const_fn` (see issue #57563)
+error[E0723]: can only call other `const` within a `const` (see issue #57563)
--> $DIR/min_const_unsafe_fn_libstd_stability2.rs:15:32
|
LL | const unsafe fn bar() -> u32 { foo() }
|
= help: add #![feature(const_fn)] to the crate attributes to enable
-error[E0723]: can only call other `min_const_fn` within a `min_const_fn` (see issue #57563)
+error[E0723]: can only call other `const` within a `const` (see issue #57563)
--> $DIR/min_const_unsafe_fn_libstd_stability2.rs:22:33
|
LL | const unsafe fn bar2() -> u32 { foo2() }
|
= help: add #![feature(const_fn)] to the crate attributes to enable
-error[E0723]: can only call other `min_const_fn` within a `min_const_fn` (see issue #57563)
+error[E0723]: can only call other `const` within a `const` (see issue #57563)
--> $DIR/min_const_unsafe_fn_libstd_stability2.rs:30:39
|
LL | const unsafe fn bar2_gated() -> u32 { foo2_gated() }