Skip to content

Commit bc20942

Browse files
committed
Auto merge of #155239 - JonathanBrouwer:rollup-XUNKT4X, r=JonathanBrouwer
Rollup of 10 pull requests Successful merges: - rust-lang/rust#155227 (`rust-analyzer` subtree update) - rust-lang/rust#153335 (Add #![unstable_removed(..)] attribute to track removed features) - rust-lang/rust#154932 (Handle RTN projections in assoc type restriction diagnostics) - rust-lang/rust#155096 (delegation: support proper interaction of user-specified args and impl Traits) - rust-lang/rust#155106 (cg_llvm: scalable vectors with `simd_cast` and `simd_select`) - rust-lang/rust#155140 (add regression test for OpenOptionsExt downstream compat) - rust-lang/rust#155182 (Make the expansion of guard metavars begin guard non-terminals) - rust-lang/rust#155226 (delegation: revert execution of hir_crate_items before delayed lowering) - rust-lang/rust#153997 (Use closures more consistently in `dep_graph.rs`.) - rust-lang/rust#155003 (update thin-vec)
2 parents 9def1ed + 424758e commit bc20942

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

src/stability.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ The `unstable` attribute infects all sub-items, where the attribute doesn't
2323
have to be reapplied. So if you apply this to a module, all items in the module
2424
will be unstable.
2525

26+
If you rename a feature, you can add `old_name = "old_name"` to produce a
27+
useful error message.
28+
2629
You can make specific sub-items stable by using the `#[stable]` attribute on
2730
them. The stability scheme works similarly to how `pub` works. You can have
2831
public functions of nonpublic modules and you can have stable functions in
@@ -189,4 +192,11 @@ Currently, the items that can be annotated with `#[unstable_feature_bound]` are:
189192
- free function
190193
- trait
191194

195+
## renamed and removed features
196+
Unstable features can get renamed and removed. If you rename a feature, you can add `old_name = "old_name"` to the `#[unstable]` attribute.
197+
If you remove a feature, the `#!unstable_removed(feature = "foo", reason = "brief description", link = "link", since = "1.90.0")`
198+
attribute should be used to produce a good error message for users of the removed feature.
199+
200+
The `link` field can be used to link to the most relevant information on the removal of the feature such as a GitHub issue, comment or PR.
201+
192202
[blog]: https://www.ralfj.de/blog/2018/07/19/const.html

0 commit comments

Comments
 (0)