const-check: stop recommending the use of rustc_allow_const_fn_unstable
This commit is contained in:
parent
283db70ace
commit
cf9ac0eec1
11 changed files with 41 additions and 247 deletions
|
|
@ -424,8 +424,7 @@ const_eval_unstable_in_stable_exposed =
|
|||
.unstable_sugg = if the {$is_function_call2 ->
|
||||
[true] caller
|
||||
*[false] function
|
||||
} is not (yet) meant to be exposed to stable, add `#[rustc_const_unstable]` (this is what you probably want to do)
|
||||
.bypass_sugg = otherwise, as a last resort `#[rustc_allow_const_fn_unstable]` can be used to bypass stability checks (this requires team approval)
|
||||
} is not (yet) meant to be exposed to stable const contexts, add `#[rustc_const_unstable]`
|
||||
|
||||
const_eval_unstable_intrinsic = `{$name}` is not yet stable as a const intrinsic
|
||||
const_eval_unstable_intrinsic_suggestion = add `#![feature({$feature})]` to the crate attributes to enable
|
||||
|
|
|
|||
|
|
@ -58,11 +58,6 @@ pub(crate) struct UnstableInStableExposed {
|
|||
code = "#[rustc_const_unstable(feature = \"...\", issue = \"...\")]\n",
|
||||
applicability = "has-placeholders"
|
||||
)]
|
||||
#[suggestion(
|
||||
const_eval_bypass_sugg,
|
||||
code = "#[rustc_allow_const_fn_unstable({gate})]\n",
|
||||
applicability = "has-placeholders"
|
||||
)]
|
||||
pub attr_span: Span,
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -5,14 +5,9 @@ LL | const fn bar() -> u32 { foo() }
|
|||
| ^^^^^
|
||||
|
|
||||
= help: mark the callee as `#[rustc_const_stable_indirect]` if it does not itself require any unstable features
|
||||
help: if the caller is not (yet) meant to be exposed to stable, add `#[rustc_const_unstable]` (this is what you probably want to do)
|
||||
help: if the caller is not (yet) meant to be exposed to stable const contexts, add `#[rustc_const_unstable]`
|
||||
|
|
||||
LL + #[rustc_const_unstable(feature = "...", issue = "...")]
|
||||
LL | const fn bar() -> u32 { foo() }
|
||||
|
|
||||
help: otherwise, as a last resort `#[rustc_allow_const_fn_unstable]` can be used to bypass stability checks (this requires team approval)
|
||||
|
|
||||
LL + #[rustc_allow_const_fn_unstable(foo)]
|
||||
LL | const fn bar() -> u32 { foo() }
|
||||
|
|
||||
|
||||
|
|
|
|||
|
|
@ -46,14 +46,9 @@ error: const function that might be (indirectly) exposed to stable cannot use `#
|
|||
LL | size_of_val(&x);
|
||||
| ^^^^^^^^^^^^^^^
|
||||
|
|
||||
help: if the function is not (yet) meant to be exposed to stable, add `#[rustc_const_unstable]` (this is what you probably want to do)
|
||||
help: if the function is not (yet) meant to be exposed to stable const contexts, add `#[rustc_const_unstable]`
|
||||
|
|
||||
LL + #[rustc_const_unstable(feature = "...", issue = "...")]
|
||||
LL | const fn const_main() {
|
||||
|
|
||||
help: otherwise, as a last resort `#[rustc_allow_const_fn_unstable]` can be used to bypass stability checks (this requires team approval)
|
||||
|
|
||||
LL + #[rustc_allow_const_fn_unstable(local)]
|
||||
LL | const fn const_main() {
|
||||
|
|
||||
|
||||
|
|
@ -63,14 +58,9 @@ error: const function that might be (indirectly) exposed to stable cannot use `#
|
|||
LL | min_align_of_val(&x);
|
||||
| ^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
help: if the function is not (yet) meant to be exposed to stable, add `#[rustc_const_unstable]` (this is what you probably want to do)
|
||||
help: if the function is not (yet) meant to be exposed to stable const contexts, add `#[rustc_const_unstable]`
|
||||
|
|
||||
LL + #[rustc_const_unstable(feature = "...", issue = "...")]
|
||||
LL | const fn const_main() {
|
||||
|
|
||||
help: otherwise, as a last resort `#[rustc_allow_const_fn_unstable]` can be used to bypass stability checks (this requires team approval)
|
||||
|
|
||||
LL + #[rustc_allow_const_fn_unstable(local)]
|
||||
LL | const fn const_main() {
|
||||
|
|
||||
|
||||
|
|
@ -88,14 +78,9 @@ error: const function that might be (indirectly) exposed to stable cannot use `#
|
|||
LL | super::size_of_val(src);
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
help: if the function is not (yet) meant to be exposed to stable, add `#[rustc_const_unstable]` (this is what you probably want to do)
|
||||
help: if the function is not (yet) meant to be exposed to stable const contexts, add `#[rustc_const_unstable]`
|
||||
|
|
||||
LL + #[rustc_const_unstable(feature = "...", issue = "...")]
|
||||
LL | const unsafe fn copy<T>(src: *const T, _dst: *mut T, _count: usize) {
|
||||
|
|
||||
help: otherwise, as a last resort `#[rustc_allow_const_fn_unstable]` can be used to bypass stability checks (this requires team approval)
|
||||
|
|
||||
LL + #[rustc_allow_const_fn_unstable(local)]
|
||||
LL | const unsafe fn copy<T>(src: *const T, _dst: *mut T, _count: usize) {
|
||||
|
|
||||
|
||||
|
|
|
|||
|
|
@ -5,14 +5,9 @@ LL | const fn bar() -> u32 { foo() }
|
|||
| ^^^^^
|
||||
|
|
||||
= help: mark the callee as `#[rustc_const_stable_indirect]` if it does not itself require any unstable features
|
||||
help: if the caller is not (yet) meant to be exposed to stable, add `#[rustc_const_unstable]` (this is what you probably want to do)
|
||||
help: if the caller is not (yet) meant to be exposed to stable const contexts, add `#[rustc_const_unstable]`
|
||||
|
|
||||
LL + #[rustc_const_unstable(feature = "...", issue = "...")]
|
||||
LL | const fn bar() -> u32 { foo() }
|
||||
|
|
||||
help: otherwise, as a last resort `#[rustc_allow_const_fn_unstable]` can be used to bypass stability checks (this requires team approval)
|
||||
|
|
||||
LL + #[rustc_allow_const_fn_unstable(foo)]
|
||||
LL | const fn bar() -> u32 { foo() }
|
||||
|
|
||||
|
||||
|
|
@ -23,14 +18,9 @@ LL | const fn bar2() -> u32 { foo2() }
|
|||
| ^^^^^^
|
||||
|
|
||||
= help: mark the callee as `#[rustc_const_stable_indirect]` if it does not itself require any unstable features
|
||||
help: if the caller is not (yet) meant to be exposed to stable, add `#[rustc_const_unstable]` (this is what you probably want to do)
|
||||
help: if the caller is not (yet) meant to be exposed to stable const contexts, add `#[rustc_const_unstable]`
|
||||
|
|
||||
LL + #[rustc_const_unstable(feature = "...", issue = "...")]
|
||||
LL | const fn bar2() -> u32 { foo2() }
|
||||
|
|
||||
help: otherwise, as a last resort `#[rustc_allow_const_fn_unstable]` can be used to bypass stability checks (this requires team approval)
|
||||
|
|
||||
LL + #[rustc_allow_const_fn_unstable(foo2)]
|
||||
LL | const fn bar2() -> u32 { foo2() }
|
||||
|
|
||||
|
||||
|
|
@ -40,14 +30,9 @@ error: const function that might be (indirectly) exposed to stable cannot use `#
|
|||
LL | let x = async { 13 };
|
||||
| ^^^^^^^^^^^^
|
||||
|
|
||||
help: if the function is not (yet) meant to be exposed to stable, add `#[rustc_const_unstable]` (this is what you probably want to do)
|
||||
help: if the function is not (yet) meant to be exposed to stable const contexts, add `#[rustc_const_unstable]`
|
||||
|
|
||||
LL + #[rustc_const_unstable(feature = "...", issue = "...")]
|
||||
LL | const fn bar3() -> u32 {
|
||||
|
|
||||
help: otherwise, as a last resort `#[rustc_allow_const_fn_unstable]` can be used to bypass stability checks (this requires team approval)
|
||||
|
|
||||
LL + #[rustc_allow_const_fn_unstable(const_async_blocks)]
|
||||
LL | const fn bar3() -> u32 {
|
||||
|
|
||||
|
||||
|
|
@ -58,14 +43,9 @@ LL | foo()
|
|||
| ^^^^^
|
||||
|
|
||||
= help: mark the callee as `#[rustc_const_stable_indirect]` if it does not itself require any unstable features
|
||||
help: if the caller is not (yet) meant to be exposed to stable, add `#[rustc_const_unstable]` (this is what you probably want to do)
|
||||
help: if the caller is not (yet) meant to be exposed to stable const contexts, add `#[rustc_const_unstable]`
|
||||
|
|
||||
LL + #[rustc_const_unstable(feature = "...", issue = "...")]
|
||||
LL | const fn bar3() -> u32 {
|
||||
|
|
||||
help: otherwise, as a last resort `#[rustc_allow_const_fn_unstable]` can be used to bypass stability checks (this requires team approval)
|
||||
|
|
||||
LL + #[rustc_allow_const_fn_unstable(foo)]
|
||||
LL | const fn bar3() -> u32 {
|
||||
|
|
||||
|
||||
|
|
@ -76,14 +56,9 @@ LL | const fn bar2_gated() -> u32 { foo2_gated() }
|
|||
| ^^^^^^^^^^^^
|
||||
|
|
||||
= help: mark the callee as `#[rustc_const_stable_indirect]` if it does not itself require any unstable features
|
||||
help: if the caller is not (yet) meant to be exposed to stable, add `#[rustc_const_unstable]` (this is what you probably want to do)
|
||||
help: if the caller is not (yet) meant to be exposed to stable const contexts, add `#[rustc_const_unstable]`
|
||||
|
|
||||
LL + #[rustc_const_unstable(feature = "...", issue = "...")]
|
||||
LL | const fn bar2_gated() -> u32 { foo2_gated() }
|
||||
|
|
||||
help: otherwise, as a last resort `#[rustc_allow_const_fn_unstable]` can be used to bypass stability checks (this requires team approval)
|
||||
|
|
||||
LL + #[rustc_allow_const_fn_unstable(foo2)]
|
||||
LL | const fn bar2_gated() -> u32 { foo2_gated() }
|
||||
|
|
||||
|
||||
|
|
@ -94,14 +69,9 @@ LL | pub(crate) const fn bar2_gated_stable_indirect() -> u32 { super::foo2_g
|
|||
| ^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= help: mark the callee as `#[rustc_const_stable_indirect]` if it does not itself require any unstable features
|
||||
help: if the caller is not (yet) meant to be exposed to stable, add `#[rustc_const_unstable]` (this is what you probably want to do)
|
||||
help: if the caller is not (yet) meant to be exposed to stable const contexts, add `#[rustc_const_unstable]`
|
||||
|
|
||||
LL + #[rustc_const_unstable(feature = "...", issue = "...")]
|
||||
LL | pub(crate) const fn bar2_gated_stable_indirect() -> u32 { super::foo2_gated() }
|
||||
|
|
||||
help: otherwise, as a last resort `#[rustc_allow_const_fn_unstable]` can be used to bypass stability checks (this requires team approval)
|
||||
|
|
||||
LL + #[rustc_allow_const_fn_unstable(foo2)]
|
||||
LL | pub(crate) const fn bar2_gated_stable_indirect() -> u32 { super::foo2_gated() }
|
||||
|
|
||||
|
||||
|
|
@ -112,14 +82,9 @@ LL | const fn stable_indirect() -> u32 { foo2_gated() }
|
|||
| ^^^^^^^^^^^^
|
||||
|
|
||||
= help: mark the callee as `#[rustc_const_stable_indirect]` if it does not itself require any unstable features
|
||||
help: if the caller is not (yet) meant to be exposed to stable, add `#[rustc_const_unstable]` (this is what you probably want to do)
|
||||
help: if the caller is not (yet) meant to be exposed to stable const contexts, add `#[rustc_const_unstable]`
|
||||
|
|
||||
LL + #[rustc_const_unstable(feature = "...", issue = "...")]
|
||||
LL | const fn stable_indirect() -> u32 { foo2_gated() }
|
||||
|
|
||||
help: otherwise, as a last resort `#[rustc_allow_const_fn_unstable]` can be used to bypass stability checks (this requires team approval)
|
||||
|
|
||||
LL + #[rustc_allow_const_fn_unstable(foo2)]
|
||||
LL | const fn stable_indirect() -> u32 { foo2_gated() }
|
||||
|
|
||||
|
||||
|
|
|
|||
|
|
@ -5,14 +5,9 @@ LL | const unsafe fn bar() -> u32 { unsafe { foo() } }
|
|||
| ^^^^^
|
||||
|
|
||||
= help: mark the callee as `#[rustc_const_stable_indirect]` if it does not itself require any unstable features
|
||||
help: if the caller is not (yet) meant to be exposed to stable, add `#[rustc_const_unstable]` (this is what you probably want to do)
|
||||
help: if the caller is not (yet) meant to be exposed to stable const contexts, add `#[rustc_const_unstable]`
|
||||
|
|
||||
LL + #[rustc_const_unstable(feature = "...", issue = "...")]
|
||||
LL | const unsafe fn bar() -> u32 { unsafe { foo() } }
|
||||
|
|
||||
help: otherwise, as a last resort `#[rustc_allow_const_fn_unstable]` can be used to bypass stability checks (this requires team approval)
|
||||
|
|
||||
LL + #[rustc_allow_const_fn_unstable(foo)]
|
||||
LL | const unsafe fn bar() -> u32 { unsafe { foo() } }
|
||||
|
|
||||
|
||||
|
|
@ -23,14 +18,9 @@ LL | const unsafe fn bar2() -> u32 { unsafe { foo2() } }
|
|||
| ^^^^^^
|
||||
|
|
||||
= help: mark the callee as `#[rustc_const_stable_indirect]` if it does not itself require any unstable features
|
||||
help: if the caller is not (yet) meant to be exposed to stable, add `#[rustc_const_unstable]` (this is what you probably want to do)
|
||||
help: if the caller is not (yet) meant to be exposed to stable const contexts, add `#[rustc_const_unstable]`
|
||||
|
|
||||
LL + #[rustc_const_unstable(feature = "...", issue = "...")]
|
||||
LL | const unsafe fn bar2() -> u32 { unsafe { foo2() } }
|
||||
|
|
||||
help: otherwise, as a last resort `#[rustc_allow_const_fn_unstable]` can be used to bypass stability checks (this requires team approval)
|
||||
|
|
||||
LL + #[rustc_allow_const_fn_unstable(foo2)]
|
||||
LL | const unsafe fn bar2() -> u32 { unsafe { foo2() } }
|
||||
|
|
||||
|
||||
|
|
@ -41,14 +31,9 @@ LL | const unsafe fn bar2_gated() -> u32 { unsafe { foo2_gated() } }
|
|||
| ^^^^^^^^^^^^
|
||||
|
|
||||
= help: mark the callee as `#[rustc_const_stable_indirect]` if it does not itself require any unstable features
|
||||
help: if the caller is not (yet) meant to be exposed to stable, add `#[rustc_const_unstable]` (this is what you probably want to do)
|
||||
help: if the caller is not (yet) meant to be exposed to stable const contexts, add `#[rustc_const_unstable]`
|
||||
|
|
||||
LL + #[rustc_const_unstable(feature = "...", issue = "...")]
|
||||
LL | const unsafe fn bar2_gated() -> u32 { unsafe { foo2_gated() } }
|
||||
|
|
||||
help: otherwise, as a last resort `#[rustc_allow_const_fn_unstable]` can be used to bypass stability checks (this requires team approval)
|
||||
|
|
||||
LL + #[rustc_allow_const_fn_unstable(foo2)]
|
||||
LL | const unsafe fn bar2_gated() -> u32 { unsafe { foo2_gated() } }
|
||||
|
|
||||
|
||||
|
|
|
|||
|
|
@ -5,14 +5,9 @@ LL | const unsafe fn bar() -> u32 { foo() }
|
|||
| ^^^^^
|
||||
|
|
||||
= help: mark the callee as `#[rustc_const_stable_indirect]` if it does not itself require any unstable features
|
||||
help: if the caller is not (yet) meant to be exposed to stable, add `#[rustc_const_unstable]` (this is what you probably want to do)
|
||||
help: if the caller is not (yet) meant to be exposed to stable const contexts, add `#[rustc_const_unstable]`
|
||||
|
|
||||
LL + #[rustc_const_unstable(feature = "...", issue = "...")]
|
||||
LL | const unsafe fn bar() -> u32 { foo() }
|
||||
|
|
||||
help: otherwise, as a last resort `#[rustc_allow_const_fn_unstable]` can be used to bypass stability checks (this requires team approval)
|
||||
|
|
||||
LL + #[rustc_allow_const_fn_unstable(foo)]
|
||||
LL | const unsafe fn bar() -> u32 { foo() }
|
||||
|
|
||||
|
||||
|
|
@ -23,14 +18,9 @@ LL | const unsafe fn bar2() -> u32 { foo2() }
|
|||
| ^^^^^^
|
||||
|
|
||||
= help: mark the callee as `#[rustc_const_stable_indirect]` if it does not itself require any unstable features
|
||||
help: if the caller is not (yet) meant to be exposed to stable, add `#[rustc_const_unstable]` (this is what you probably want to do)
|
||||
help: if the caller is not (yet) meant to be exposed to stable const contexts, add `#[rustc_const_unstable]`
|
||||
|
|
||||
LL + #[rustc_const_unstable(feature = "...", issue = "...")]
|
||||
LL | const unsafe fn bar2() -> u32 { foo2() }
|
||||
|
|
||||
help: otherwise, as a last resort `#[rustc_allow_const_fn_unstable]` can be used to bypass stability checks (this requires team approval)
|
||||
|
|
||||
LL + #[rustc_allow_const_fn_unstable(foo2)]
|
||||
LL | const unsafe fn bar2() -> u32 { foo2() }
|
||||
|
|
||||
|
||||
|
|
@ -41,14 +31,9 @@ LL | const unsafe fn bar2_gated() -> u32 { foo2_gated() }
|
|||
| ^^^^^^^^^^^^
|
||||
|
|
||||
= help: mark the callee as `#[rustc_const_stable_indirect]` if it does not itself require any unstable features
|
||||
help: if the caller is not (yet) meant to be exposed to stable, add `#[rustc_const_unstable]` (this is what you probably want to do)
|
||||
help: if the caller is not (yet) meant to be exposed to stable const contexts, add `#[rustc_const_unstable]`
|
||||
|
|
||||
LL + #[rustc_const_unstable(feature = "...", issue = "...")]
|
||||
LL | const unsafe fn bar2_gated() -> u32 { foo2_gated() }
|
||||
|
|
||||
help: otherwise, as a last resort `#[rustc_allow_const_fn_unstable]` can be used to bypass stability checks (this requires team approval)
|
||||
|
|
||||
LL + #[rustc_allow_const_fn_unstable(foo2)]
|
||||
LL | const unsafe fn bar2_gated() -> u32 { foo2_gated() }
|
||||
|
|
||||
|
||||
|
|
|
|||
|
|
@ -5,14 +5,9 @@ LL | unstable_if_unmarked_const_fn_crate::not_stably_const();
|
|||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= help: mark the callee as `#[rustc_const_stable_indirect]` if it does not itself require any unstable features
|
||||
help: if the caller is not (yet) meant to be exposed to stable, add `#[rustc_const_unstable]` (this is what you probably want to do)
|
||||
help: if the caller is not (yet) meant to be exposed to stable const contexts, add `#[rustc_const_unstable]`
|
||||
|
|
||||
LL + #[rustc_const_unstable(feature = "...", issue = "...")]
|
||||
LL | const fn stable_fn() {
|
||||
|
|
||||
help: otherwise, as a last resort `#[rustc_allow_const_fn_unstable]` can be used to bypass stability checks (this requires team approval)
|
||||
|
|
||||
LL + #[rustc_allow_const_fn_unstable(rustc_private)]
|
||||
LL | const fn stable_fn() {
|
||||
|
|
||||
|
||||
|
|
|
|||
|
|
@ -5,14 +5,9 @@ LL | not_stably_const();
|
|||
| ^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= help: mark the callee as `#[rustc_const_stable_indirect]` if it does not itself require any unstable features
|
||||
help: if the caller is not (yet) meant to be exposed to stable, add `#[rustc_const_unstable]` (this is what you probably want to do)
|
||||
help: if the caller is not (yet) meant to be exposed to stable const contexts, add `#[rustc_const_unstable]`
|
||||
|
|
||||
LL + #[rustc_const_unstable(feature = "...", issue = "...")]
|
||||
LL | pub const fn expose_on_stable() {
|
||||
|
|
||||
help: otherwise, as a last resort `#[rustc_allow_const_fn_unstable]` can be used to bypass stability checks (this requires team approval)
|
||||
|
|
||||
LL + #[rustc_allow_const_fn_unstable(rustc_private)]
|
||||
LL | pub const fn expose_on_stable() {
|
||||
|
|
||||
|
||||
|
|
@ -22,14 +17,9 @@ error: const function that might be (indirectly) exposed to stable cannot use `#
|
|||
LL | let _x = async { 15 };
|
||||
| ^^^^^^^^^^^^
|
||||
|
|
||||
help: if the function is not (yet) meant to be exposed to stable, add `#[rustc_const_unstable]` (this is what you probably want to do)
|
||||
help: if the function is not (yet) meant to be exposed to stable const contexts, add `#[rustc_const_unstable]`
|
||||
|
|
||||
LL + #[rustc_const_unstable(feature = "...", issue = "...")]
|
||||
LL | pub const fn expose_on_stable() {
|
||||
|
|
||||
help: otherwise, as a last resort `#[rustc_allow_const_fn_unstable]` can be used to bypass stability checks (this requires team approval)
|
||||
|
|
||||
LL + #[rustc_allow_const_fn_unstable(const_async_blocks)]
|
||||
LL | pub const fn expose_on_stable() {
|
||||
|
|
||||
|
||||
|
|
|
|||
|
|
@ -4,14 +4,9 @@ error: const function that might be (indirectly) exposed to stable cannot use `#
|
|||
LL | const_eval_select((), nothing, log);
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
help: if the function is not (yet) meant to be exposed to stable, add `#[rustc_const_unstable]` (this is what you probably want to do)
|
||||
help: if the function is not (yet) meant to be exposed to stable const contexts, add `#[rustc_const_unstable]`
|
||||
|
|
||||
LL + #[rustc_const_unstable(feature = "...", issue = "...")]
|
||||
LL | pub const fn hey() {
|
||||
|
|
||||
help: otherwise, as a last resort `#[rustc_allow_const_fn_unstable]` can be used to bypass stability checks (this requires team approval)
|
||||
|
|
||||
LL + #[rustc_allow_const_fn_unstable(const_eval_select)]
|
||||
LL | pub const fn hey() {
|
||||
|
|
||||
|
||||
|
|
|
|||
|
|
@ -71,14 +71,9 @@ error: const function that might be (indirectly) exposed to stable cannot use `#
|
|||
LL | Unstable::func();
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
|
|
||||
help: if the function is not (yet) meant to be exposed to stable, add `#[rustc_const_unstable]` (this is what you probably want to do)
|
||||
help: if the function is not (yet) meant to be exposed to stable const contexts, add `#[rustc_const_unstable]`
|
||||
|
|
||||
LL + #[rustc_const_unstable(feature = "...", issue = "...")]
|
||||
LL | const fn const_context() {
|
||||
|
|
||||
help: otherwise, as a last resort `#[rustc_allow_const_fn_unstable]` can be used to bypass stability checks (this requires team approval)
|
||||
|
|
||||
LL + #[rustc_allow_const_fn_unstable(const_trait_impl)]
|
||||
LL | const fn const_context() {
|
||||
|
|
||||
|
||||
|
|
@ -88,14 +83,9 @@ error: const function that might be (indirectly) exposed to stable cannot use `#
|
|||
LL | Unstable::func();
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
|
|
||||
help: if the function is not (yet) meant to be exposed to stable, add `#[rustc_const_unstable]` (this is what you probably want to do)
|
||||
help: if the function is not (yet) meant to be exposed to stable const contexts, add `#[rustc_const_unstable]`
|
||||
|
|
||||
LL + #[rustc_const_unstable(feature = "...", issue = "...")]
|
||||
LL | const fn const_context() {
|
||||
|
|
||||
help: otherwise, as a last resort `#[rustc_allow_const_fn_unstable]` can be used to bypass stability checks (this requires team approval)
|
||||
|
|
||||
LL + #[rustc_allow_const_fn_unstable(unstable)]
|
||||
LL | const fn const_context() {
|
||||
|
|
||||
|
||||
|
|
@ -105,14 +95,9 @@ error: const function that might be (indirectly) exposed to stable cannot use `#
|
|||
LL | Foo::func();
|
||||
| ^^^^^^^^^^^
|
||||
|
|
||||
help: if the function is not (yet) meant to be exposed to stable, add `#[rustc_const_unstable]` (this is what you probably want to do)
|
||||
help: if the function is not (yet) meant to be exposed to stable const contexts, add `#[rustc_const_unstable]`
|
||||
|
|
||||
LL + #[rustc_const_unstable(feature = "...", issue = "...")]
|
||||
LL | const fn const_context() {
|
||||
|
|
||||
help: otherwise, as a last resort `#[rustc_allow_const_fn_unstable]` can be used to bypass stability checks (this requires team approval)
|
||||
|
|
||||
LL + #[rustc_allow_const_fn_unstable(const_trait_impl)]
|
||||
LL | const fn const_context() {
|
||||
|
|
||||
|
||||
|
|
@ -122,14 +107,9 @@ error: const function that might be (indirectly) exposed to stable cannot use `#
|
|||
LL | Foo::func();
|
||||
| ^^^^^^^^^^^
|
||||
|
|
||||
help: if the function is not (yet) meant to be exposed to stable, add `#[rustc_const_unstable]` (this is what you probably want to do)
|
||||
help: if the function is not (yet) meant to be exposed to stable const contexts, add `#[rustc_const_unstable]`
|
||||
|
|
||||
LL + #[rustc_const_unstable(feature = "...", issue = "...")]
|
||||
LL | const fn const_context() {
|
||||
|
|
||||
help: otherwise, as a last resort `#[rustc_allow_const_fn_unstable]` can be used to bypass stability checks (this requires team approval)
|
||||
|
|
||||
LL + #[rustc_allow_const_fn_unstable(unstable)]
|
||||
LL | const fn const_context() {
|
||||
|
|
||||
|
||||
|
|
@ -139,14 +119,9 @@ error: const function that might be (indirectly) exposed to stable cannot use `#
|
|||
LL | Unstable2::func();
|
||||
| ^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
help: if the function is not (yet) meant to be exposed to stable, add `#[rustc_const_unstable]` (this is what you probably want to do)
|
||||
help: if the function is not (yet) meant to be exposed to stable const contexts, add `#[rustc_const_unstable]`
|
||||
|
|
||||
LL + #[rustc_const_unstable(feature = "...", issue = "...")]
|
||||
LL | const fn const_context() {
|
||||
|
|
||||
help: otherwise, as a last resort `#[rustc_allow_const_fn_unstable]` can be used to bypass stability checks (this requires team approval)
|
||||
|
|
||||
LL + #[rustc_allow_const_fn_unstable(const_trait_impl)]
|
||||
LL | const fn const_context() {
|
||||
|
|
||||
|
||||
|
|
@ -156,14 +131,9 @@ error: const function that might be (indirectly) exposed to stable cannot use `#
|
|||
LL | Unstable2::func();
|
||||
| ^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
help: if the function is not (yet) meant to be exposed to stable, add `#[rustc_const_unstable]` (this is what you probably want to do)
|
||||
help: if the function is not (yet) meant to be exposed to stable const contexts, add `#[rustc_const_unstable]`
|
||||
|
|
||||
LL + #[rustc_const_unstable(feature = "...", issue = "...")]
|
||||
LL | const fn const_context() {
|
||||
|
|
||||
help: otherwise, as a last resort `#[rustc_allow_const_fn_unstable]` can be used to bypass stability checks (this requires team approval)
|
||||
|
|
||||
LL + #[rustc_allow_const_fn_unstable(unstable)]
|
||||
LL | const fn const_context() {
|
||||
|
|
||||
|
||||
|
|
@ -173,14 +143,9 @@ error: const function that might be (indirectly) exposed to stable cannot use `#
|
|||
LL | conditionally_const::<Foo>();
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
help: if the function is not (yet) meant to be exposed to stable, add `#[rustc_const_unstable]` (this is what you probably want to do)
|
||||
help: if the function is not (yet) meant to be exposed to stable const contexts, add `#[rustc_const_unstable]`
|
||||
|
|
||||
LL + #[rustc_const_unstable(feature = "...", issue = "...")]
|
||||
LL | const fn const_context() {
|
||||
|
|
||||
help: otherwise, as a last resort `#[rustc_allow_const_fn_unstable]` can be used to bypass stability checks (this requires team approval)
|
||||
|
|
||||
LL + #[rustc_allow_const_fn_unstable(const_trait_impl)]
|
||||
LL | const fn const_context() {
|
||||
|
|
||||
|
||||
|
|
@ -190,14 +155,9 @@ error: const function that might be (indirectly) exposed to stable cannot use `#
|
|||
LL | Unstable::func();
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
|
|
||||
help: if the function is not (yet) meant to be exposed to stable, add `#[rustc_const_unstable]` (this is what you probably want to do)
|
||||
help: if the function is not (yet) meant to be exposed to stable const contexts, add `#[rustc_const_unstable]`
|
||||
|
|
||||
LL + #[rustc_const_unstable(feature = "...", issue = "...")]
|
||||
LL | const fn stable_const_context() {
|
||||
|
|
||||
help: otherwise, as a last resort `#[rustc_allow_const_fn_unstable]` can be used to bypass stability checks (this requires team approval)
|
||||
|
|
||||
LL + #[rustc_allow_const_fn_unstable(const_trait_impl)]
|
||||
LL | const fn stable_const_context() {
|
||||
|
|
||||
|
||||
|
|
@ -207,14 +167,9 @@ error: const function that might be (indirectly) exposed to stable cannot use `#
|
|||
LL | Unstable::func();
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
|
|
||||
help: if the function is not (yet) meant to be exposed to stable, add `#[rustc_const_unstable]` (this is what you probably want to do)
|
||||
help: if the function is not (yet) meant to be exposed to stable const contexts, add `#[rustc_const_unstable]`
|
||||
|
|
||||
LL + #[rustc_const_unstable(feature = "...", issue = "...")]
|
||||
LL | const fn stable_const_context() {
|
||||
|
|
||||
help: otherwise, as a last resort `#[rustc_allow_const_fn_unstable]` can be used to bypass stability checks (this requires team approval)
|
||||
|
|
||||
LL + #[rustc_allow_const_fn_unstable(unstable)]
|
||||
LL | const fn stable_const_context() {
|
||||
|
|
||||
|
||||
|
|
@ -224,14 +179,9 @@ error: const function that might be (indirectly) exposed to stable cannot use `#
|
|||
LL | Foo::func();
|
||||
| ^^^^^^^^^^^
|
||||
|
|
||||
help: if the function is not (yet) meant to be exposed to stable, add `#[rustc_const_unstable]` (this is what you probably want to do)
|
||||
help: if the function is not (yet) meant to be exposed to stable const contexts, add `#[rustc_const_unstable]`
|
||||
|
|
||||
LL + #[rustc_const_unstable(feature = "...", issue = "...")]
|
||||
LL | const fn stable_const_context() {
|
||||
|
|
||||
help: otherwise, as a last resort `#[rustc_allow_const_fn_unstable]` can be used to bypass stability checks (this requires team approval)
|
||||
|
|
||||
LL + #[rustc_allow_const_fn_unstable(const_trait_impl)]
|
||||
LL | const fn stable_const_context() {
|
||||
|
|
||||
|
||||
|
|
@ -241,14 +191,9 @@ error: const function that might be (indirectly) exposed to stable cannot use `#
|
|||
LL | Foo::func();
|
||||
| ^^^^^^^^^^^
|
||||
|
|
||||
help: if the function is not (yet) meant to be exposed to stable, add `#[rustc_const_unstable]` (this is what you probably want to do)
|
||||
help: if the function is not (yet) meant to be exposed to stable const contexts, add `#[rustc_const_unstable]`
|
||||
|
|
||||
LL + #[rustc_const_unstable(feature = "...", issue = "...")]
|
||||
LL | const fn stable_const_context() {
|
||||
|
|
||||
help: otherwise, as a last resort `#[rustc_allow_const_fn_unstable]` can be used to bypass stability checks (this requires team approval)
|
||||
|
|
||||
LL + #[rustc_allow_const_fn_unstable(unstable)]
|
||||
LL | const fn stable_const_context() {
|
||||
|
|
||||
|
||||
|
|
@ -259,14 +204,9 @@ LL | const_context_not_const_stable();
|
|||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= help: mark the callee as `#[rustc_const_stable_indirect]` if it does not itself require any unstable features
|
||||
help: if the caller is not (yet) meant to be exposed to stable, add `#[rustc_const_unstable]` (this is what you probably want to do)
|
||||
help: if the caller is not (yet) meant to be exposed to stable const contexts, add `#[rustc_const_unstable]`
|
||||
|
|
||||
LL + #[rustc_const_unstable(feature = "...", issue = "...")]
|
||||
LL | const fn stable_const_context() {
|
||||
|
|
||||
help: otherwise, as a last resort `#[rustc_allow_const_fn_unstable]` can be used to bypass stability checks (this requires team approval)
|
||||
|
|
||||
LL + #[rustc_allow_const_fn_unstable(local_feature)]
|
||||
LL | const fn stable_const_context() {
|
||||
|
|
||||
|
||||
|
|
@ -276,14 +216,9 @@ error: const function that might be (indirectly) exposed to stable cannot use `#
|
|||
LL | conditionally_const::<Foo>();
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
help: if the function is not (yet) meant to be exposed to stable, add `#[rustc_const_unstable]` (this is what you probably want to do)
|
||||
help: if the function is not (yet) meant to be exposed to stable const contexts, add `#[rustc_const_unstable]`
|
||||
|
|
||||
LL + #[rustc_const_unstable(feature = "...", issue = "...")]
|
||||
LL | const fn stable_const_context() {
|
||||
|
|
||||
help: otherwise, as a last resort `#[rustc_allow_const_fn_unstable]` can be used to bypass stability checks (this requires team approval)
|
||||
|
|
||||
LL + #[rustc_allow_const_fn_unstable(const_trait_impl)]
|
||||
LL | const fn stable_const_context() {
|
||||
|
|
||||
|
||||
|
|
@ -293,14 +228,9 @@ error: const function that might be (indirectly) exposed to stable cannot use `#
|
|||
LL | Unstable::func();
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
|
|
||||
help: if the function is not (yet) meant to be exposed to stable, add `#[rustc_const_unstable]` (this is what you probably want to do)
|
||||
help: if the function is not (yet) meant to be exposed to stable const contexts, add `#[rustc_const_unstable]`
|
||||
|
|
||||
LL + #[rustc_const_unstable(feature = "...", issue = "...")]
|
||||
LL | const fn implicitly_stable_const_context() {
|
||||
|
|
||||
help: otherwise, as a last resort `#[rustc_allow_const_fn_unstable]` can be used to bypass stability checks (this requires team approval)
|
||||
|
|
||||
LL + #[rustc_allow_const_fn_unstable(const_trait_impl)]
|
||||
LL | const fn implicitly_stable_const_context() {
|
||||
|
|
||||
|
||||
|
|
@ -310,14 +240,9 @@ error: const function that might be (indirectly) exposed to stable cannot use `#
|
|||
LL | Unstable::func();
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
|
|
||||
help: if the function is not (yet) meant to be exposed to stable, add `#[rustc_const_unstable]` (this is what you probably want to do)
|
||||
help: if the function is not (yet) meant to be exposed to stable const contexts, add `#[rustc_const_unstable]`
|
||||
|
|
||||
LL + #[rustc_const_unstable(feature = "...", issue = "...")]
|
||||
LL | const fn implicitly_stable_const_context() {
|
||||
|
|
||||
help: otherwise, as a last resort `#[rustc_allow_const_fn_unstable]` can be used to bypass stability checks (this requires team approval)
|
||||
|
|
||||
LL + #[rustc_allow_const_fn_unstable(unstable)]
|
||||
LL | const fn implicitly_stable_const_context() {
|
||||
|
|
||||
|
||||
|
|
@ -327,14 +252,9 @@ error: const function that might be (indirectly) exposed to stable cannot use `#
|
|||
LL | Foo::func();
|
||||
| ^^^^^^^^^^^
|
||||
|
|
||||
help: if the function is not (yet) meant to be exposed to stable, add `#[rustc_const_unstable]` (this is what you probably want to do)
|
||||
help: if the function is not (yet) meant to be exposed to stable const contexts, add `#[rustc_const_unstable]`
|
||||
|
|
||||
LL + #[rustc_const_unstable(feature = "...", issue = "...")]
|
||||
LL | const fn implicitly_stable_const_context() {
|
||||
|
|
||||
help: otherwise, as a last resort `#[rustc_allow_const_fn_unstable]` can be used to bypass stability checks (this requires team approval)
|
||||
|
|
||||
LL + #[rustc_allow_const_fn_unstable(const_trait_impl)]
|
||||
LL | const fn implicitly_stable_const_context() {
|
||||
|
|
||||
|
||||
|
|
@ -344,14 +264,9 @@ error: const function that might be (indirectly) exposed to stable cannot use `#
|
|||
LL | Foo::func();
|
||||
| ^^^^^^^^^^^
|
||||
|
|
||||
help: if the function is not (yet) meant to be exposed to stable, add `#[rustc_const_unstable]` (this is what you probably want to do)
|
||||
help: if the function is not (yet) meant to be exposed to stable const contexts, add `#[rustc_const_unstable]`
|
||||
|
|
||||
LL + #[rustc_const_unstable(feature = "...", issue = "...")]
|
||||
LL | const fn implicitly_stable_const_context() {
|
||||
|
|
||||
help: otherwise, as a last resort `#[rustc_allow_const_fn_unstable]` can be used to bypass stability checks (this requires team approval)
|
||||
|
|
||||
LL + #[rustc_allow_const_fn_unstable(unstable)]
|
||||
LL | const fn implicitly_stable_const_context() {
|
||||
|
|
||||
|
||||
|
|
@ -362,14 +277,9 @@ LL | const_context_not_const_stable();
|
|||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= help: mark the callee as `#[rustc_const_stable_indirect]` if it does not itself require any unstable features
|
||||
help: if the caller is not (yet) meant to be exposed to stable, add `#[rustc_const_unstable]` (this is what you probably want to do)
|
||||
help: if the caller is not (yet) meant to be exposed to stable const contexts, add `#[rustc_const_unstable]`
|
||||
|
|
||||
LL + #[rustc_const_unstable(feature = "...", issue = "...")]
|
||||
LL | const fn implicitly_stable_const_context() {
|
||||
|
|
||||
help: otherwise, as a last resort `#[rustc_allow_const_fn_unstable]` can be used to bypass stability checks (this requires team approval)
|
||||
|
|
||||
LL + #[rustc_allow_const_fn_unstable(local_feature)]
|
||||
LL | const fn implicitly_stable_const_context() {
|
||||
|
|
||||
|
||||
|
|
@ -379,14 +289,9 @@ error: const function that might be (indirectly) exposed to stable cannot use `#
|
|||
LL | conditionally_const::<Foo>();
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
help: if the function is not (yet) meant to be exposed to stable, add `#[rustc_const_unstable]` (this is what you probably want to do)
|
||||
help: if the function is not (yet) meant to be exposed to stable const contexts, add `#[rustc_const_unstable]`
|
||||
|
|
||||
LL + #[rustc_const_unstable(feature = "...", issue = "...")]
|
||||
LL | const fn implicitly_stable_const_context() {
|
||||
|
|
||||
help: otherwise, as a last resort `#[rustc_allow_const_fn_unstable]` can be used to bypass stability checks (this requires team approval)
|
||||
|
|
||||
LL + #[rustc_allow_const_fn_unstable(const_trait_impl)]
|
||||
LL | const fn implicitly_stable_const_context() {
|
||||
|
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue