we can now enable the 'const stable fn must be stable' check
This commit is contained in:
parent
f370f3493d
commit
d066dfdb83
9 changed files with 27 additions and 13 deletions
|
@ -45,6 +45,7 @@ const fn unstable_fn() {}
|
|||
#[stable(feature = "stable_struct", since = "1.39.0")] // ok!
|
||||
struct Stable;
|
||||
|
||||
#[stable(feature = "stable_fn", since = "1.39.0")]
|
||||
#[rustc_const_stable(feature = "stable_fn", since = "1.39.0")] // ok!
|
||||
const fn stable_fn() {}
|
||||
```
|
||||
|
|
|
@ -30,6 +30,7 @@ To fix this issue, you need to provide the `since` field. Example:
|
|||
#[stable(feature = "_stable_fn", since = "1.0.0")] // ok!
|
||||
fn _stable_fn() {}
|
||||
|
||||
#[stable(feature = "_stable_const_fn", since = "1.0.0")]
|
||||
#[rustc_const_stable(feature = "_stable_const_fn", since = "1.0.0")] // ok!
|
||||
const fn _stable_const_fn() {}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue