X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=compiler%2Frustc_error_codes%2Fsrc%2Ferror_codes%2FE0545.md;h=7aba084f4d3aa82b50e8c3958ec891c5b7d4ef84;hb=07f903e0e0816821c41a19774f029086b557738b;hp=9fb935a3ab1abbb254c7b05631ec7c75cec17a52;hpb=199095afc69e208de659aceb9269bfa2940d074d;p=rust.git 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