Fix typo in const stability error message
This commit is contained in:
parent
f94018810c
commit
626d3ba514
8 changed files with 17 additions and 17 deletions
|
@ -416,7 +416,7 @@ const_eval_unsized_local = unsized locals are not supported
|
||||||
const_eval_unstable_const_fn = `{$def_path}` is not yet stable as a const fn
|
const_eval_unstable_const_fn = `{$def_path}` is not yet stable as a const fn
|
||||||
const_eval_unstable_in_stable_exposed =
|
const_eval_unstable_in_stable_exposed =
|
||||||
const function that might be (indirectly) exposed to stable cannot use `#[feature({$gate})]`
|
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 ->
|
.unstable_sugg = if the {$is_function_call2 ->
|
||||||
[true] caller
|
[true] caller
|
||||||
*[false] function
|
*[false] function
|
||||||
|
|
|
@ -4,7 +4,7 @@ error: const function that might be (indirectly) exposed to stable cannot use `#
|
||||||
LL | const fn bar() -> u32 { foo() }
|
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)
|
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 = "...")]
|
LL + #[rustc_const_unstable(feature = "...", issue = "...")]
|
||||||
|
|
|
@ -4,7 +4,7 @@ error: const function that might be (indirectly) exposed to stable cannot use `#
|
||||||
LL | const fn bar() -> u32 { foo() }
|
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)
|
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 = "...")]
|
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() }
|
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)
|
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 = "...")]
|
LL + #[rustc_const_unstable(feature = "...", issue = "...")]
|
||||||
|
@ -57,7 +57,7 @@ error: const function that might be (indirectly) exposed to stable cannot use `#
|
||||||
LL | foo()
|
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)
|
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 = "...")]
|
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() }
|
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)
|
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 = "...")]
|
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() }
|
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)
|
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 = "...")]
|
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() }
|
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)
|
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 = "...")]
|
LL + #[rustc_const_unstable(feature = "...", issue = "...")]
|
||||||
|
|
|
@ -4,7 +4,7 @@ error: const function that might be (indirectly) exposed to stable cannot use `#
|
||||||
LL | const unsafe fn bar() -> u32 { unsafe { foo() } }
|
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)
|
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 = "...")]
|
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() } }
|
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)
|
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 = "...")]
|
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() } }
|
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)
|
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 = "...")]
|
LL + #[rustc_const_unstable(feature = "...", issue = "...")]
|
||||||
|
|
|
@ -4,7 +4,7 @@ error: const function that might be (indirectly) exposed to stable cannot use `#
|
||||||
LL | const unsafe fn bar() -> u32 { foo() }
|
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)
|
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 = "...")]
|
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() }
|
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)
|
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 = "...")]
|
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() }
|
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)
|
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 = "...")]
|
LL + #[rustc_const_unstable(feature = "...", issue = "...")]
|
||||||
|
|
|
@ -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();
|
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)
|
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 = "...")]
|
LL + #[rustc_const_unstable(feature = "...", issue = "...")]
|
||||||
|
|
|
@ -4,7 +4,7 @@ error: const function that might be (indirectly) exposed to stable cannot use `#
|
||||||
LL | not_stably_const();
|
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)
|
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 = "...")]
|
LL + #[rustc_const_unstable(feature = "...", issue = "...")]
|
||||||
|
|
|
@ -106,7 +106,7 @@ error: const function that might be (indirectly) exposed to stable cannot use `#
|
||||||
LL | const_context_not_const_stable();
|
LL | const_context_not_const_stable();
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
|
|
||||||
= 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)
|
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 = "...")]
|
LL + #[rustc_const_unstable(feature = "...", issue = "...")]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue