diff --git a/compiler/rustc_middle/messages.ftl b/compiler/rustc_middle/messages.ftl index 8f8fa555c84e2..5fb962334a02b 100644 --- a/compiler/rustc_middle/messages.ftl +++ b/compiler/rustc_middle/messages.ftl @@ -52,7 +52,7 @@ middle_const_not_used_in_type_alias = middle_const_unstable_in_const_stable_exposed = const function that might be (indirectly) exposed to stable cannot use `#[feature({$gate})]` - .is_function_call = mark the callee as `#[rustc_const_stable_indirect]` if it does not itself require any unsafe features + .is_function_call = mark the callee as `#[rustc_const_stable_indirect]` if it does not itself require any unstable features .unstable_sugg = if the {$is_function_call2 -> [true] caller *[false] function diff --git a/tests/ui/consts/const-eval/dont_promote_unstable_const_fn.stderr b/tests/ui/consts/const-eval/dont_promote_unstable_const_fn.stderr index 1de1c78faf6e6..a506f2a282bbb 100644 --- a/tests/ui/consts/const-eval/dont_promote_unstable_const_fn.stderr +++ b/tests/ui/consts/const-eval/dont_promote_unstable_const_fn.stderr @@ -4,7 +4,7 @@ error: const function that might be (indirectly) exposed to stable cannot use `# LL | const fn bar() -> u32 { foo() } | ^^^^^ | - = help: mark the callee as `#[rustc_const_stable_indirect]` if it does not itself require any unsafe 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) | LL + #[rustc_const_unstable(feature = "...", issue = "...")] diff --git a/tests/ui/consts/min_const_fn/min_const_fn_libstd_stability.stderr b/tests/ui/consts/min_const_fn/min_const_fn_libstd_stability.stderr index 899cec07ac70c..26dedc49a3928 100644 --- a/tests/ui/consts/min_const_fn/min_const_fn_libstd_stability.stderr +++ b/tests/ui/consts/min_const_fn/min_const_fn_libstd_stability.stderr @@ -4,7 +4,7 @@ error: const function that might be (indirectly) exposed to stable cannot use `# LL | const fn bar() -> u32 { foo() } | ^^^^^ | - = help: mark the callee as `#[rustc_const_stable_indirect]` if it does not itself require any unsafe 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) | LL + #[rustc_const_unstable(feature = "...", issue = "...")] @@ -22,7 +22,7 @@ error: const function that might be (indirectly) exposed to stable cannot use `# LL | const fn bar2() -> u32 { foo2() } | ^^^^^^ | - = help: mark the callee as `#[rustc_const_stable_indirect]` if it does not itself require any unsafe 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) | LL + #[rustc_const_unstable(feature = "...", issue = "...")] @@ -57,7 +57,7 @@ error: const function that might be (indirectly) exposed to stable cannot use `# LL | foo() | ^^^^^ | - = help: mark the callee as `#[rustc_const_stable_indirect]` if it does not itself require any unsafe 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) | LL + #[rustc_const_unstable(feature = "...", issue = "...")] @@ -75,7 +75,7 @@ error: const function that might be (indirectly) exposed to stable cannot use `# LL | const fn bar2_gated() -> u32 { foo2_gated() } | ^^^^^^^^^^^^ | - = help: mark the callee as `#[rustc_const_stable_indirect]` if it does not itself require any unsafe 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) | LL + #[rustc_const_unstable(feature = "...", issue = "...")] @@ -93,7 +93,7 @@ error: const function that might be (indirectly) exposed to stable cannot use `# LL | pub(crate) const fn bar2_gated_stable_indirect() -> u32 { super::foo2_gated() } | ^^^^^^^^^^^^^^^^^^^ | - = help: mark the callee as `#[rustc_const_stable_indirect]` if it does not itself require any unsafe 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) | LL + #[rustc_const_unstable(feature = "...", issue = "...")] @@ -111,7 +111,7 @@ error: const function that might be (indirectly) exposed to stable cannot use `# LL | const fn stable_indirect() -> u32 { foo2_gated() } | ^^^^^^^^^^^^ | - = help: mark the callee as `#[rustc_const_stable_indirect]` if it does not itself require any unsafe 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) | LL + #[rustc_const_unstable(feature = "...", issue = "...")] diff --git a/tests/ui/consts/min_const_fn/min_const_unsafe_fn_libstd_stability.stderr b/tests/ui/consts/min_const_fn/min_const_unsafe_fn_libstd_stability.stderr index 442a079020f1b..b61f7db6f43b7 100644 --- a/tests/ui/consts/min_const_fn/min_const_unsafe_fn_libstd_stability.stderr +++ b/tests/ui/consts/min_const_fn/min_const_unsafe_fn_libstd_stability.stderr @@ -4,7 +4,7 @@ error: const function that might be (indirectly) exposed to stable cannot use `# LL | const unsafe fn bar() -> u32 { unsafe { foo() } } | ^^^^^ | - = help: mark the callee as `#[rustc_const_stable_indirect]` if it does not itself require any unsafe 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) | LL + #[rustc_const_unstable(feature = "...", issue = "...")] @@ -22,7 +22,7 @@ error: const function that might be (indirectly) exposed to stable cannot use `# LL | const unsafe fn bar2() -> u32 { unsafe { foo2() } } | ^^^^^^ | - = help: mark the callee as `#[rustc_const_stable_indirect]` if it does not itself require any unsafe 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) | LL + #[rustc_const_unstable(feature = "...", issue = "...")] @@ -40,7 +40,7 @@ error: const function that might be (indirectly) exposed to stable cannot use `# 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 unsafe 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) | LL + #[rustc_const_unstable(feature = "...", issue = "...")] diff --git a/tests/ui/consts/min_const_fn/min_const_unsafe_fn_libstd_stability2.stderr b/tests/ui/consts/min_const_fn/min_const_unsafe_fn_libstd_stability2.stderr index ff37cba7b9aca..fad8e396e9ab5 100644 --- a/tests/ui/consts/min_const_fn/min_const_unsafe_fn_libstd_stability2.stderr +++ b/tests/ui/consts/min_const_fn/min_const_unsafe_fn_libstd_stability2.stderr @@ -4,7 +4,7 @@ error: const function that might be (indirectly) exposed to stable cannot use `# LL | const unsafe fn bar() -> u32 { foo() } | ^^^^^ | - = help: mark the callee as `#[rustc_const_stable_indirect]` if it does not itself require any unsafe 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) | LL + #[rustc_const_unstable(feature = "...", issue = "...")] @@ -22,7 +22,7 @@ error: const function that might be (indirectly) exposed to stable cannot use `# LL | const unsafe fn bar2() -> u32 { foo2() } | ^^^^^^ | - = help: mark the callee as `#[rustc_const_stable_indirect]` if it does not itself require any unsafe 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) | LL + #[rustc_const_unstable(feature = "...", issue = "...")] @@ -40,7 +40,7 @@ error: const function that might be (indirectly) exposed to stable cannot use `# 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 unsafe 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) | LL + #[rustc_const_unstable(feature = "...", issue = "...")] diff --git a/tests/ui/consts/min_const_fn/recursive_const_stab_unmarked_crate_imports.stderr b/tests/ui/consts/min_const_fn/recursive_const_stab_unmarked_crate_imports.stderr index a655c0faab629..bbe749f595893 100644 --- a/tests/ui/consts/min_const_fn/recursive_const_stab_unmarked_crate_imports.stderr +++ b/tests/ui/consts/min_const_fn/recursive_const_stab_unmarked_crate_imports.stderr @@ -4,7 +4,7 @@ error: const function that might be (indirectly) exposed to stable cannot use `# 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 unsafe 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) | LL + #[rustc_const_unstable(feature = "...", issue = "...")] diff --git a/tests/ui/consts/min_const_fn/recursive_const_stab_unstable_if_unmarked.stderr b/tests/ui/consts/min_const_fn/recursive_const_stab_unstable_if_unmarked.stderr index d4ba0f9df2daf..9d7b81c822bd1 100644 --- a/tests/ui/consts/min_const_fn/recursive_const_stab_unstable_if_unmarked.stderr +++ b/tests/ui/consts/min_const_fn/recursive_const_stab_unstable_if_unmarked.stderr @@ -4,7 +4,7 @@ error: const function that might be (indirectly) exposed to stable cannot use `# LL | not_stably_const(); | ^^^^^^^^^^^^^^^^^^ | - = help: mark the callee as `#[rustc_const_stable_indirect]` if it does not itself require any unsafe 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) | LL + #[rustc_const_unstable(feature = "...", issue = "...")]