about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2020-09-14 10:56:30 +0000
committerbors <bors@rust-lang.org>2020-09-14 10:56:30 +0000
commit57c5f40cf4d7685538f6e3a405612f939e0a5e47 (patch)
tree53536d85a919d05576eb38c89b0696999009848d /src
parent356d8ad1a310a2265e05d5c193d41704030d70d3 (diff)
parentd069c7e928ab2ac95e3f524ea4d56de518aa2329 (diff)
downloadrust-57c5f40cf4d7685538f6e3a405612f939e0a5e47.tar.gz
rust-57c5f40cf4d7685538f6e3a405612f939e0a5e47.zip
Auto merge of #75740 - GuillaumeGomez:stabilize-doc-alias-feature, r=ollie27
Stabilize doc_alias feature

Fixes #50146.

This PR intend to stabilize the `doc_alias` feature. The last remaining bits were missing checks on the attribute usage and on its arguments. Both have been added so I think we can now move to the next step.

r? `@ollie27`

cc `@rust-lang/rustdoc`
Diffstat (limited to 'src')
-rw-r--r--src/doc/rustdoc/src/advanced-features.md14
-rw-r--r--src/doc/rustdoc/src/unstable-features.md16
-rw-r--r--src/doc/unstable-book/src/language-features/doc-alias.md23
-rw-r--r--src/test/ui/feature-gates/feature-gate-doc_alias.rs4
-rw-r--r--src/test/ui/feature-gates/feature-gate-doc_alias.stderr12
5 files changed, 14 insertions, 55 deletions
diff --git a/src/doc/rustdoc/src/advanced-features.md b/src/doc/rustdoc/src/advanced-features.md
index 7c12d23e649..c9a0dff5ab3 100644
--- a/src/doc/rustdoc/src/advanced-features.md
+++ b/src/doc/rustdoc/src/advanced-features.md
@@ -32,3 +32,17 @@ pub struct UnixToken;
 
 Here, the respective tokens can only be used by dependent crates on their respective platforms, but
 they will both appear in documentation.
+
+## Add aliases for an item in documentation search
+
+This feature allows you to add alias(es) to an item when using the `rustdoc` search through the
+`doc(alias)` attribute. Example:
+
+```rust,no_run
+#[doc(alias = "x")]
+#[doc(alias = "big")]
+pub struct BigX;
+```
+
+Then, when looking for it through the `rustdoc` search, if you enter "x" or
+"big", search will show the `BigX` struct first.
diff --git a/src/doc/rustdoc/src/unstable-features.md b/src/doc/rustdoc/src/unstable-features.md
index 2f49fc8a415..cd8edbcd1a4 100644
--- a/src/doc/rustdoc/src/unstable-features.md
+++ b/src/doc/rustdoc/src/unstable-features.md
@@ -207,22 +207,6 @@ issue][issue-include].
 [unstable-include]: ../unstable-book/language-features/external-doc.html
 [issue-include]: https://github.com/rust-lang/rust/issues/44732
 
-### Add aliases for an item in documentation search
-
-This feature allows you to add alias(es) to an item when using the `rustdoc` search through the
-`doc(alias)` attribute. Example:
-
-```rust,no_run
-#![feature(doc_alias)]
-
-#[doc(alias = "x")]
-#[doc(alias = "big")]
-pub struct BigX;
-```
-
-Then, when looking for it through the `rustdoc` search, if you enter "x" or
-"big", search will show the `BigX` struct first.
-
 ## Unstable command-line arguments
 
 These features are enabled by passing a command-line flag to Rustdoc, but the flags in question are
diff --git a/src/doc/unstable-book/src/language-features/doc-alias.md b/src/doc/unstable-book/src/language-features/doc-alias.md
deleted file mode 100644
index 647ac0cf663..00000000000
--- a/src/doc/unstable-book/src/language-features/doc-alias.md
+++ /dev/null
@@ -1,23 +0,0 @@
-# `doc_alias`
-
-The tracking issue for this feature is: [#50146]
-
-[#50146]: https://github.com/rust-lang/rust/issues/50146
-
-------------------------
-
-You can add alias(es) to an item when using the `rustdoc` search through the
-`doc(alias)` attribute. Example:
-
-```rust,no_run
-#![feature(doc_alias)]
-
-#[doc(alias = "x")]
-#[doc(alias = "big")]
-pub struct BigX;
-```
-
-Then, when looking for it through the `rustdoc` search, if you enter "x" or
-"big", search will show the `BigX` struct first.
-
-Note that this feature is currently hidden behind the `feature(doc_alias)` gate.
diff --git a/src/test/ui/feature-gates/feature-gate-doc_alias.rs b/src/test/ui/feature-gates/feature-gate-doc_alias.rs
deleted file mode 100644
index c95722102d9..00000000000
--- a/src/test/ui/feature-gates/feature-gate-doc_alias.rs
+++ /dev/null
@@ -1,4 +0,0 @@
-#[doc(alias = "foo")] //~ ERROR: `#[doc(alias)]` is experimental
-pub struct Foo;
-
-fn main() {}
diff --git a/src/test/ui/feature-gates/feature-gate-doc_alias.stderr b/src/test/ui/feature-gates/feature-gate-doc_alias.stderr
deleted file mode 100644
index f66d1602ba2..00000000000
--- a/src/test/ui/feature-gates/feature-gate-doc_alias.stderr
+++ /dev/null
@@ -1,12 +0,0 @@
-error[E0658]: `#[doc(alias)]` is experimental
-  --> $DIR/feature-gate-doc_alias.rs:1:1
-   |
-LL | #[doc(alias = "foo")]
-   | ^^^^^^^^^^^^^^^^^^^^^
-   |
-   = note: see issue #50146 <https://github.com/rust-lang/rust/issues/50146> for more information
-   = help: add `#![feature(doc_alias)]` to the crate attributes to enable
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0658`.