]> git.proxmox.com Git - rustc.git/blobdiff - compiler/rustc_error_codes/src/error_codes/E0547.md
New upstream version 1.55.0+dfsg1
[rustc.git] / compiler / rustc_error_codes / src / error_codes / E0547.md
index 1aa4b354248842e5dbf408fb6cefb563d97f27c2..4950325df640007c23ef4e6b2490f74a49623b9a 100644 (file)
@@ -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