const-check: stop recommending the use of rustc_allow_const_fn_unstable

This commit is contained in:
Ralf Jung
2025-05-25 22:16:10 +02:00
parent 283db70ace
commit cf9ac0eec1
11 changed files with 41 additions and 247 deletions

View File

@@ -424,8 +424,7 @@ const_eval_unstable_in_stable_exposed =
.unstable_sugg = if the {$is_function_call2 -> .unstable_sugg = if the {$is_function_call2 ->
[true] caller [true] caller
*[false] function *[false] function
} is not (yet) meant to be exposed to stable, add `#[rustc_const_unstable]` (this is what you probably want to do) } is not (yet) meant to be exposed to stable const contexts, add `#[rustc_const_unstable]`
.bypass_sugg = otherwise, as a last resort `#[rustc_allow_const_fn_unstable]` can be used to bypass stability checks (this requires team approval)
const_eval_unstable_intrinsic = `{$name}` is not yet stable as a const intrinsic 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 const_eval_unstable_intrinsic_suggestion = add `#![feature({$feature})]` to the crate attributes to enable

View File

@@ -58,11 +58,6 @@ pub(crate) struct UnstableInStableExposed {
code = "#[rustc_const_unstable(feature = \"...\", issue = \"...\")]\n", code = "#[rustc_const_unstable(feature = \"...\", issue = \"...\")]\n",
applicability = "has-placeholders" applicability = "has-placeholders"
)] )]
#[suggestion(
const_eval_bypass_sugg,
code = "#[rustc_allow_const_fn_unstable({gate})]\n",
applicability = "has-placeholders"
)]
pub attr_span: Span, pub attr_span: Span,
} }

View File

@@ -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: 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 + #[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() } LL | const fn bar() -> u32 { foo() }
| |

View File

@@ -46,14 +46,9 @@ error: const function that might be (indirectly) exposed to stable cannot use `#
LL | size_of_val(&x); 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 + #[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() { 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); 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 + #[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() { 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); 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 + #[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) { LL | const unsafe fn copy<T>(src: *const T, _dst: *mut T, _count: usize) {
| |

View File

@@ -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: 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 + #[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() } 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: 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 + #[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() } 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 }; 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 + #[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 { 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: 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 + #[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 { 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: 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 + #[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() } 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: 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 + #[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() } 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: 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 + #[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() } LL | const fn stable_indirect() -> u32 { foo2_gated() }
| |

View File

@@ -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: 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 + #[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() } } 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: 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 + #[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() } } 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: 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 + #[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() } } LL | const unsafe fn bar2_gated() -> u32 { unsafe { foo2_gated() } }
| |

View File

@@ -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: 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 + #[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() } 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: 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 + #[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() } 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: 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 + #[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() } LL | const unsafe fn bar2_gated() -> u32 { foo2_gated() }
| |

View File

@@ -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: 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 + #[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() { LL | const fn stable_fn() {
| |

View File

@@ -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: 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 + #[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() { 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 }; 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 + #[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() { LL | pub const fn expose_on_stable() {
| |

View File

@@ -4,14 +4,9 @@ error: const function that might be (indirectly) exposed to stable cannot use `#
LL | const_eval_select((), nothing, log); 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 + #[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() { LL | pub const fn hey() {
| |

View File

@@ -71,14 +71,9 @@ error: const function that might be (indirectly) exposed to stable cannot use `#
LL | Unstable::func(); 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 + #[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() { LL | const fn const_context() {
| |
@@ -88,14 +83,9 @@ error: const function that might be (indirectly) exposed to stable cannot use `#
LL | Unstable::func(); 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 + #[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() { LL | const fn const_context() {
| |
@@ -105,14 +95,9 @@ error: const function that might be (indirectly) exposed to stable cannot use `#
LL | Foo::func(); 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 + #[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() { LL | const fn const_context() {
| |
@@ -122,14 +107,9 @@ error: const function that might be (indirectly) exposed to stable cannot use `#
LL | Foo::func(); 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 + #[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() { LL | const fn const_context() {
| |
@@ -139,14 +119,9 @@ error: const function that might be (indirectly) exposed to stable cannot use `#
LL | Unstable2::func(); 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 + #[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() { LL | const fn const_context() {
| |
@@ -156,14 +131,9 @@ error: const function that might be (indirectly) exposed to stable cannot use `#
LL | Unstable2::func(); 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 + #[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() { 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>(); 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 + #[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() { LL | const fn const_context() {
| |
@@ -190,14 +155,9 @@ error: const function that might be (indirectly) exposed to stable cannot use `#
LL | Unstable::func(); 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 + #[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() { 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(); 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 + #[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() { 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(); 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 + #[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() { 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(); 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 + #[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() { 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: 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 + #[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() { 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>(); 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 + #[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() { 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(); 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 + #[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() { 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(); 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 + #[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() { 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(); 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 + #[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() { 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(); 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 + #[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() { 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: 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 + #[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() { 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>(); 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 + #[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() { LL | const fn implicitly_stable_const_context() {
| |