about summary refs log tree commit diff
path: root/compiler/rustc_error_codes/src
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/rustc_error_codes/src')
-rw-r--r--compiler/rustc_error_codes/src/error_codes/E0542.md4
-rw-r--r--compiler/rustc_error_codes/src/error_codes/E0545.md4
-rw-r--r--compiler/rustc_error_codes/src/error_codes/E0547.md4
3 files changed, 6 insertions, 6 deletions
diff --git a/compiler/rustc_error_codes/src/error_codes/E0542.md b/compiler/rustc_error_codes/src/error_codes/E0542.md
index 7cb58f9d0cb..7fecfeaa57c 100644
--- a/compiler/rustc_error_codes/src/error_codes/E0542.md
+++ b/compiler/rustc_error_codes/src/error_codes/E0542.md
@@ -10,7 +10,7 @@ Erroneous code example:
 fn _stable_fn() {}
 
 #[rustc_const_stable(feature = "_stable_const_fn")] // invalid
-fn _stable_const_fn() {}
+const fn _stable_const_fn() {}
 
 #[stable(feature = "_deprecated_fn", since = "0.1.0")]
 #[rustc_deprecated(
@@ -29,7 +29,7 @@ To fix this issue, you need to provide the `since` field. Example:
 fn _stable_fn() {}
 
 #[rustc_const_stable(feature = "_stable_const_fn", since = "1.0.0")] // ok!
-fn _stable_const_fn() {}
+const fn _stable_const_fn() {}
 
 #[stable(feature = "_deprecated_fn", since = "0.1.0")]
 #[rustc_deprecated(
diff --git a/compiler/rustc_error_codes/src/error_codes/E0545.md b/compiler/rustc_error_codes/src/error_codes/E0545.md
index 9fb935a3ab1..7aba084f4d3 100644
--- a/compiler/rustc_error_codes/src/error_codes/E0545.md
+++ b/compiler/rustc_error_codes/src/error_codes/E0545.md
@@ -10,7 +10,7 @@ Erroneous code example:
 fn _unstable_fn() {}
 
 #[rustc_const_unstable(feature = "_unstable_const_fn", issue = "0")] // invalid
-fn _unstable_const_fn() {}
+const fn _unstable_const_fn() {}
 ```
 
 To fix this issue, you need to provide a correct value in the `issue` field.
@@ -24,7 +24,7 @@ Example:
 fn _unstable_fn() {}
 
 #[rustc_const_unstable(feature = "_unstable_const_fn", issue = "1")] // ok!
-fn _unstable_const_fn() {}
+const fn _unstable_const_fn() {}
 ```
 
 See the [How Rust is Made and “Nightly Rust”][how-rust-made-nightly] appendix
diff --git a/compiler/rustc_error_codes/src/error_codes/E0547.md b/compiler/rustc_error_codes/src/error_codes/E0547.md
index 1aa4b354248..4950325df64 100644
--- a/compiler/rustc_error_codes/src/error_codes/E0547.md
+++ b/compiler/rustc_error_codes/src/error_codes/E0547.md
@@ -10,7 +10,7 @@ Erroneous code example:
 fn _unstable_fn() {}
 
 #[rustc_const_unstable(feature = "_unstable_const_fn")] // invalid
-fn _unstable_const_fn() {}
+const fn _unstable_const_fn() {}
 ```
 
 To fix this issue, you need to provide the `issue` field. Example:
@@ -26,7 +26,7 @@ fn _unstable_fn() {}
     feature = "_unstable_const_fn",
     issue = "none"
 )] // ok!
-fn _unstable_const_fn() {}
+const fn _unstable_const_fn() {}
 ```
 
 See the [How Rust is Made and “Nightly Rust”][how-rust-made-nightly] appendix