Skip to content

Commit d069c7e

Browse files
Stabilize doc_alias feature
1 parent b5f55b7 commit d069c7e

File tree

10 files changed

+18
-61
lines changed

10 files changed

+18
-61
lines changed

compiler/rustc_ast_passes/src/feature_gate.rs

-1
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,6 @@ impl<'a> Visitor<'a> for PostExpansionVisitor<'a> {
260260
cfg => doc_cfg
261261
masked => doc_masked
262262
spotlight => doc_spotlight
263-
alias => doc_alias
264263
keyword => doc_keyword
265264
);
266265
}

compiler/rustc_feature/src/accepted.rs

+2
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,8 @@ declare_features! (
268268
/// Allows `#[track_caller]` to be used which provides
269269
/// accurate caller location reporting during panic (RFC 2091).
270270
(accepted, track_caller, "1.46.0", Some(47809), None),
271+
/// Allows `#[doc(alias = "...")]`.
272+
(accepted, doc_alias, "1.48.0", Some(50146), None),
271273

272274
// -------------------------------------------------------------------------
273275
// feature-group-end: accepted features

compiler/rustc_feature/src/active.rs

-3
Original file line numberDiff line numberDiff line change
@@ -404,9 +404,6 @@ declare_features! (
404404
/// Allows dereferencing raw pointers during const eval.
405405
(active, const_raw_ptr_deref, "1.27.0", Some(51911), None),
406406

407-
/// Allows `#[doc(alias = "...")]`.
408-
(active, doc_alias, "1.27.0", Some(50146), None),
409-
410407
/// Allows inconsistent bounds in where clauses.
411408
(active, trivial_bounds, "1.28.0", Some(48214), None),
412409

library/core/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@
131131
#![feature(untagged_unions)]
132132
#![feature(unwind_attributes)]
133133
#![feature(variant_count)]
134-
#![feature(doc_alias)]
134+
#![cfg_attr(bootstrap, feature(doc_alias))]
135135
#![feature(mmx_target_feature)]
136136
#![feature(tbm_target_feature)]
137137
#![feature(sse4a_target_feature)]

library/std/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@
245245
#![feature(core_intrinsics)]
246246
#![feature(custom_test_frameworks)]
247247
#![feature(decl_macro)]
248-
#![feature(doc_alias)]
248+
#![cfg_attr(bootstrap, feature(doc_alias))]
249249
#![feature(doc_cfg)]
250250
#![feature(doc_keyword)]
251251
#![feature(doc_masked)]

src/doc/rustdoc/src/advanced-features.md

+14
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,17 @@ pub struct UnixToken;
3232

3333
Here, the respective tokens can only be used by dependent crates on their respective platforms, but
3434
they will both appear in documentation.
35+
36+
## Add aliases for an item in documentation search
37+
38+
This feature allows you to add alias(es) to an item when using the `rustdoc` search through the
39+
`doc(alias)` attribute. Example:
40+
41+
```rust,no_run
42+
#[doc(alias = "x")]
43+
#[doc(alias = "big")]
44+
pub struct BigX;
45+
```
46+
47+
Then, when looking for it through the `rustdoc` search, if you enter "x" or
48+
"big", search will show the `BigX` struct first.

src/doc/rustdoc/src/unstable-features.md

-16
Original file line numberDiff line numberDiff line change
@@ -207,22 +207,6 @@ issue][issue-include].
207207
[unstable-include]: ../unstable-book/language-features/external-doc.html
208208
[issue-include]: https://github.com/rust-lang/rust/issues/44732
209209

210-
### Add aliases for an item in documentation search
211-
212-
This feature allows you to add alias(es) to an item when using the `rustdoc` search through the
213-
`doc(alias)` attribute. Example:
214-
215-
```rust,no_run
216-
#![feature(doc_alias)]
217-
218-
#[doc(alias = "x")]
219-
#[doc(alias = "big")]
220-
pub struct BigX;
221-
```
222-
223-
Then, when looking for it through the `rustdoc` search, if you enter "x" or
224-
"big", search will show the `BigX` struct first.
225-
226210
## Unstable command-line arguments
227211

228212
These features are enabled by passing a command-line flag to Rustdoc, but the flags in question are

src/doc/unstable-book/src/language-features/doc-alias.md

-23
This file was deleted.

src/test/ui/feature-gates/feature-gate-doc_alias.rs

-4
This file was deleted.

src/test/ui/feature-gates/feature-gate-doc_alias.stderr

-12
This file was deleted.

0 commit comments

Comments
 (0)