Skip to content

Commit 626d3ba

Browse files
committed
Fix typo in const stability error message
1 parent f940188 commit 626d3ba

8 files changed

+17
-17
lines changed

compiler/rustc_const_eval/messages.ftl

+1-1
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,7 @@ const_eval_unsized_local = unsized locals are not supported
416416
const_eval_unstable_const_fn = `{$def_path}` is not yet stable as a const fn
417417
const_eval_unstable_in_stable_exposed =
418418
const function that might be (indirectly) exposed to stable cannot use `#[feature({$gate})]`
419-
.is_function_call = mark the callee as `#[rustc_const_stable_indirect]` if it does not itself require any unsafe features
419+
.is_function_call = mark the callee as `#[rustc_const_stable_indirect]` if it does not itself require any unstable features
420420
.unstable_sugg = if the {$is_function_call2 ->
421421
[true] caller
422422
*[false] function

tests/ui/consts/const-eval/dont_promote_unstable_const_fn.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ error: const function that might be (indirectly) exposed to stable cannot use `#
44
LL | const fn bar() -> u32 { foo() }
55
| ^^^^^
66
|
7-
= help: mark the callee as `#[rustc_const_stable_indirect]` if it does not itself require any unsafe features
7+
= help: mark the callee as `#[rustc_const_stable_indirect]` if it does not itself require any unstable features
88
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)
99
|
1010
LL + #[rustc_const_unstable(feature = "...", issue = "...")]

tests/ui/consts/min_const_fn/min_const_fn_libstd_stability.stderr

+6-6
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ error: const function that might be (indirectly) exposed to stable cannot use `#
44
LL | const fn bar() -> u32 { foo() }
55
| ^^^^^
66
|
7-
= help: mark the callee as `#[rustc_const_stable_indirect]` if it does not itself require any unsafe features
7+
= help: mark the callee as `#[rustc_const_stable_indirect]` if it does not itself require any unstable features
88
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)
99
|
1010
LL + #[rustc_const_unstable(feature = "...", issue = "...")]
@@ -22,7 +22,7 @@ error: const function that might be (indirectly) exposed to stable cannot use `#
2222
LL | const fn bar2() -> u32 { foo2() }
2323
| ^^^^^^
2424
|
25-
= help: mark the callee as `#[rustc_const_stable_indirect]` if it does not itself require any unsafe features
25+
= help: mark the callee as `#[rustc_const_stable_indirect]` if it does not itself require any unstable features
2626
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)
2727
|
2828
LL + #[rustc_const_unstable(feature = "...", issue = "...")]
@@ -57,7 +57,7 @@ error: const function that might be (indirectly) exposed to stable cannot use `#
5757
LL | foo()
5858
| ^^^^^
5959
|
60-
= help: mark the callee as `#[rustc_const_stable_indirect]` if it does not itself require any unsafe features
60+
= help: mark the callee as `#[rustc_const_stable_indirect]` if it does not itself require any unstable features
6161
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)
6262
|
6363
LL + #[rustc_const_unstable(feature = "...", issue = "...")]
@@ -75,7 +75,7 @@ error: const function that might be (indirectly) exposed to stable cannot use `#
7575
LL | const fn bar2_gated() -> u32 { foo2_gated() }
7676
| ^^^^^^^^^^^^
7777
|
78-
= help: mark the callee as `#[rustc_const_stable_indirect]` if it does not itself require any unsafe features
78+
= help: mark the callee as `#[rustc_const_stable_indirect]` if it does not itself require any unstable features
7979
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)
8080
|
8181
LL + #[rustc_const_unstable(feature = "...", issue = "...")]
@@ -93,7 +93,7 @@ error: const function that might be (indirectly) exposed to stable cannot use `#
9393
LL | pub(crate) const fn bar2_gated_stable_indirect() -> u32 { super::foo2_gated() }
9494
| ^^^^^^^^^^^^^^^^^^^
9595
|
96-
= help: mark the callee as `#[rustc_const_stable_indirect]` if it does not itself require any unsafe features
96+
= help: mark the callee as `#[rustc_const_stable_indirect]` if it does not itself require any unstable features
9797
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)
9898
|
9999
LL + #[rustc_const_unstable(feature = "...", issue = "...")]
@@ -111,7 +111,7 @@ error: const function that might be (indirectly) exposed to stable cannot use `#
111111
LL | const fn stable_indirect() -> u32 { foo2_gated() }
112112
| ^^^^^^^^^^^^
113113
|
114-
= help: mark the callee as `#[rustc_const_stable_indirect]` if it does not itself require any unsafe features
114+
= help: mark the callee as `#[rustc_const_stable_indirect]` if it does not itself require any unstable features
115115
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)
116116
|
117117
LL + #[rustc_const_unstable(feature = "...", issue = "...")]

tests/ui/consts/min_const_fn/min_const_unsafe_fn_libstd_stability.stderr

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ error: const function that might be (indirectly) exposed to stable cannot use `#
44
LL | const unsafe fn bar() -> u32 { unsafe { foo() } }
55
| ^^^^^
66
|
7-
= help: mark the callee as `#[rustc_const_stable_indirect]` if it does not itself require any unsafe features
7+
= help: mark the callee as `#[rustc_const_stable_indirect]` if it does not itself require any unstable features
88
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)
99
|
1010
LL + #[rustc_const_unstable(feature = "...", issue = "...")]
@@ -22,7 +22,7 @@ error: const function that might be (indirectly) exposed to stable cannot use `#
2222
LL | const unsafe fn bar2() -> u32 { unsafe { foo2() } }
2323
| ^^^^^^
2424
|
25-
= help: mark the callee as `#[rustc_const_stable_indirect]` if it does not itself require any unsafe features
25+
= help: mark the callee as `#[rustc_const_stable_indirect]` if it does not itself require any unstable features
2626
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)
2727
|
2828
LL + #[rustc_const_unstable(feature = "...", issue = "...")]
@@ -40,7 +40,7 @@ error: const function that might be (indirectly) exposed to stable cannot use `#
4040
LL | const unsafe fn bar2_gated() -> u32 { unsafe { foo2_gated() } }
4141
| ^^^^^^^^^^^^
4242
|
43-
= help: mark the callee as `#[rustc_const_stable_indirect]` if it does not itself require any unsafe features
43+
= help: mark the callee as `#[rustc_const_stable_indirect]` if it does not itself require any unstable features
4444
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)
4545
|
4646
LL + #[rustc_const_unstable(feature = "...", issue = "...")]

tests/ui/consts/min_const_fn/min_const_unsafe_fn_libstd_stability2.stderr

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ error: const function that might be (indirectly) exposed to stable cannot use `#
44
LL | const unsafe fn bar() -> u32 { foo() }
55
| ^^^^^
66
|
7-
= help: mark the callee as `#[rustc_const_stable_indirect]` if it does not itself require any unsafe features
7+
= help: mark the callee as `#[rustc_const_stable_indirect]` if it does not itself require any unstable features
88
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)
99
|
1010
LL + #[rustc_const_unstable(feature = "...", issue = "...")]
@@ -22,7 +22,7 @@ error: const function that might be (indirectly) exposed to stable cannot use `#
2222
LL | const unsafe fn bar2() -> u32 { foo2() }
2323
| ^^^^^^
2424
|
25-
= help: mark the callee as `#[rustc_const_stable_indirect]` if it does not itself require any unsafe features
25+
= help: mark the callee as `#[rustc_const_stable_indirect]` if it does not itself require any unstable features
2626
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)
2727
|
2828
LL + #[rustc_const_unstable(feature = "...", issue = "...")]
@@ -40,7 +40,7 @@ error: const function that might be (indirectly) exposed to stable cannot use `#
4040
LL | const unsafe fn bar2_gated() -> u32 { foo2_gated() }
4141
| ^^^^^^^^^^^^
4242
|
43-
= help: mark the callee as `#[rustc_const_stable_indirect]` if it does not itself require any unsafe features
43+
= help: mark the callee as `#[rustc_const_stable_indirect]` if it does not itself require any unstable features
4444
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)
4545
|
4646
LL + #[rustc_const_unstable(feature = "...", issue = "...")]

tests/ui/consts/min_const_fn/recursive_const_stab_unmarked_crate_imports.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ error: const function that might be (indirectly) exposed to stable cannot use `#
44
LL | unstable_if_unmarked_const_fn_crate::not_stably_const();
55
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
66
|
7-
= help: mark the callee as `#[rustc_const_stable_indirect]` if it does not itself require any unsafe features
7+
= help: mark the callee as `#[rustc_const_stable_indirect]` if it does not itself require any unstable features
88
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)
99
|
1010
LL + #[rustc_const_unstable(feature = "...", issue = "...")]

tests/ui/consts/min_const_fn/recursive_const_stab_unstable_if_unmarked.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ error: const function that might be (indirectly) exposed to stable cannot use `#
44
LL | not_stably_const();
55
| ^^^^^^^^^^^^^^^^^^
66
|
7-
= help: mark the callee as `#[rustc_const_stable_indirect]` if it does not itself require any unsafe features
7+
= help: mark the callee as `#[rustc_const_stable_indirect]` if it does not itself require any unstable features
88
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)
99
|
1010
LL + #[rustc_const_unstable(feature = "...", issue = "...")]

tests/ui/traits/const-traits/staged-api.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ error: const function that might be (indirectly) exposed to stable cannot use `#
106106
LL | const_context_not_const_stable();
107107
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
108108
|
109-
= help: mark the callee as `#[rustc_const_stable_indirect]` if it does not itself require any unsafe features
109+
= help: mark the callee as `#[rustc_const_stable_indirect]` if it does not itself require any unstable features
110110
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)
111111
|
112112
LL + #[rustc_const_unstable(feature = "...", issue = "...")]

0 commit comments

Comments
 (0)