File tree 1 file changed +22
-0
lines changed
1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -49,6 +49,28 @@ marks an item as stabilized. To do this, follow the instructions in
49
49
50
50
Note that stable functions may use unstable things in their body.
51
51
52
+ ## rustc_const_unstable
53
+
54
+ The ` #[rustc_const_unstable(feature = "foo", issue = "1234", reason = "lorem ipsum")] `
55
+ has the same interface as the ` unstable ` attribute. It is used to mark
56
+ ` const fn ` as having their constness be unstable. This allows you to make a
57
+ function stable without stabilizing its constness or even just marking an existing
58
+ stable function as ` const fn ` without instantly stabilizing the ` const fn ` ness.
59
+
60
+ Furthermore this attribute is needed to mark an intrinsic as ` const fn ` , because
61
+ there's no way to add ` const ` to functions in ` extern ` blocks for now.
62
+
63
+ ## rustc_const_stable
64
+
65
+ The ` #[stable(feature = "foo", "since = "1.420.69")] ` attribute explicitly marks
66
+ a ` const fn ` as having its constness be ` stable ` . This attribute can make sense
67
+ even on an ` unstable ` function, if that function is called from another
68
+ ` rustc_const_stable ` function.
69
+
70
+ Furthermore this attribute is needed to mark an intrinsic as callable from
71
+ ` rustc_const_stable ` functions.
72
+
73
+
52
74
## allow_internal_unstable
53
75
54
76
Macros, compiler desugarings and ` const fn ` s expose their bodies to the call
You can’t perform that action at this time.
0 commit comments