File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,11 @@ The `issue` field specifies the associated GitHub [issue number]. This field is
2121required and all unstable features should have an associated tracking issue. In
2222rare cases where there is no sensible value ` issue = "none" ` is used.
2323
24+ An item may be annotated with multiple ` #[unstable] ` attributes if its
25+ stabilization depends on multiple features being stabilized.
26+ In that case, it cannot be used without enabling each feature present in its
27+ ` #[unstable] ` attributes.
28+
2429The ` unstable ` attribute infects all sub-items, where the attribute doesn't
2530have to be reapplied. So if you apply this to a module, all items in the module
2631will be unstable.
@@ -47,7 +52,12 @@ prevents breaking dependencies by leveraging Cargo's lint capping.
4752
4853## stable
4954The ` #[stable(feature = "foo", since = "1.420.69")] ` attribute explicitly
50- marks an item as stabilized. Note that stable functions may use unstable things in their body.
55+ marks an item as stabilized. However, ` #[unstable] ` attributes take precedence:
56+ an item with both ` #[stable] ` and ` #[unstable] ` attributes is unstable.
57+ A stable item with multiple ` #[stable] ` attributes is treated as stabilized in
58+ the most recent version present in the attributes' ` since ` fields.
59+
60+ Note that stable functions may use unstable things in their body.
5161
5262## rustc_const_unstable
5363
You can’t perform that action at this time.
0 commit comments