Skip to content

Commit 41f54d8

Browse files
authored
Update stability.md
1 parent a9ed149 commit 41f54d8

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/stability.md

+4
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ The `#[unstable(feature = "foo", issue = "1234", reason = "lorem ipsum")]` attri
1111
marks an item as unstable. This infects all sub-items, where the attribute doesn't have to be
1212
reapplied. So if you apply this to a module, all items in the module will be unstable.
1313

14+
You can make specific sub-items stable by using the `#[stable]` attribute on them.
15+
The stability scheme works similarly to how `pub` works. You can have public functions of
16+
nonpublic modules and you can have stable functions in unstable modules or vice versa.
17+
1418
# stable
1519

1620
The `#[stable(feature = "foo", "since = "1.420.69")]` attribute explicitly marks an item as

0 commit comments

Comments
 (0)