Add long explanation for E0547
This commit is contained in:
27
compiler/rustc_error_codes/src/error_codes/E0547.md
Normal file
27
compiler/rustc_error_codes/src/error_codes/E0547.md
Normal file
@@ -0,0 +1,27 @@
|
||||
#![stable(since = "1.0.0", feature = "test")]
|
||||
#[unstable(feature = "_unstable_fn")] // invalid
|
||||
fn _unstable_fn() {}
|
||||
#[rustc_const_unstable(feature = "_unstable_const_fn")] // invalid
|
||||
fn _unstable_const_fn() {}
|
||||
```
|
||||
|
||||
To fix the issue you need to provide the `issue` field.
|
||||
|
||||
```
|
||||
#![feature(staged_api)]
|
||||
#![stable(since = "1.0.0", feature = "test")]
|
||||
#[unstable(feature = "_unstable_fn", issue = "none")] // ok!
|
||||
fn _unstable_fn() {}
|
||||
#[rustc_const_unstable(
|
||||
feature = "_unstable_const_fn",
|
||||
issue = "none"
|
||||
)] // ok!
|
||||
fn _unstable_const_fn() {}
|
||||
```
|
||||
|
||||
See the [How Rust is Made and “Nightly Rust”][how-rust-made-nightly] appendix
|
||||
of the Book and the [Stability attributes][stability-attributes] section of the
|
||||
Rustc Dev Guide for more details.
|
||||
|
||||
[how-rust-made-nightly]: https://doc.rust-lang.org/book/appendix-07-nightly-rust.html
|
||||
[stability-attributes]: https://rustc-dev-guide.rust-lang.org/stability.html
|
||||
Reference in New Issue
Block a user