@@ -4,8 +4,8 @@ This section is about the stability attributes and schemes that allow stable
44APIs to use unstable APIs internally in the rustc standard library.
55
66** NOTE** : this section is for * library* features, not * language* features.
7- For instructions on
8- stabilizing a language feature see [ Stabilizing Features] ( ./stabilization-guide.md ) .
7+ For instructions on stabilizing a language feature,
8+ see [ Stabilizing Features] ( ./stabilization-guide.md ) .
99
1010## unstable
1111
@@ -18,31 +18,30 @@ This restriction only applies across
1818crate boundaries, unstable items may be used within the crate that defines them.
1919
2020The ` issue ` field specifies the associated GitHub [ issue number] .
21- This field is
22- required and all unstable features should have an associated tracking issue.
23- In rare cases where there is no sensible value ` issue = "none" ` is used.
21+ This field is required,
22+ and all unstable features should have an associated tracking issue.
23+ In rare cases where there is no sensible value, ` issue = "none" ` is used.
2424
2525The ` unstable ` attribute infects all sub-items, where the attribute doesn't
2626have to be reapplied.
27- So if you apply this to a module, all items in the module will be unstable.
27+ So, if you apply this to a module, all items in the module will be unstable.
2828
29- If you rename a feature, you can add ` old_name = "old_name" ` to produce a
29+ If you rename a feature, you can add ` old_name = "old_name" ` to produce a
3030useful error message.
3131
3232You can make specific sub-items stable by using the ` #[stable] ` attribute on
3333them.
3434The stability scheme works similarly to how ` pub ` works.
35- You can have
36- public functions of nonpublic modules and you can have stable functions in
37- unstable modules or vice versa.
35+ You can have public functions of non-public modules,
36+ and you can have stable functions in unstable modules or vice versa.
3837
3938Previously, due to a [ rustc bug] , stable items inside unstable modules were
4039available to stable code in that location.
4140As of <!-- date-check --> September 2024, items with [ accidentally stabilized
4241paths] are marked with the ` #[rustc_allowed_through_unstable_modules] ` attribute
4342to prevent code dependent on those paths from breaking.
44- Do * not* add this attribute
45- to any more items unless that is needed to avoid breaking changes.
43+ Do * not* add this attribute to any more items,
44+ unless that is needed to avoid breaking changes.
4645
4746The ` unstable ` attribute may also have the ` soft ` value, which makes it a
4847future-incompatible deny-by-default lint instead of a hard error.
@@ -161,7 +160,7 @@ You also need to take care to uphold the `const fn` invariant that calling it at
161160compile-time needs to behave the same (see also [ this blog post] [ blog ] ).
162161This means that you
163162may not create a ` const fn ` that e.g. transmutes a memory address to an integer,
164- because the addresses of things are nondeterministic and often unknown at
163+ because the addresses of things are non-deterministic and often unknown at
165164compile-time.
166165
167166** Always ping @rust-lang/wg-const-eval if you are adding more
0 commit comments