about summary refs log tree commit diff
path: root/tests/ui/feature-gates
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume1.gomez@gmail.com>2025-04-11 14:32:31 +0200
committerGuillaume Gomez <guillaume1.gomez@gmail.com>2025-09-27 11:29:49 +0200
commitc06a076634e4feab47e133fe6325af9659bab082 (patch)
treea76922c076d81c95adca4ac6aafe77383a0e9a10 /tests/ui/feature-gates
parented05315867b7dd17a456beaabc3faf36357f9447 (diff)
downloadrust-c06a076634e4feab47e133fe6325af9659bab082.tar.gz
rust-c06a076634e4feab47e133fe6325af9659bab082.zip
Put back the `doc_cfg` code behind a nightly feature
Diffstat (limited to 'tests/ui/feature-gates')
-rw-r--r--tests/ui/feature-gates/feature-gate-doc_cfg.rs6
-rw-r--r--tests/ui/feature-gates/feature-gate-doc_cfg.stderr13
2 files changed, 14 insertions, 5 deletions
diff --git a/tests/ui/feature-gates/feature-gate-doc_cfg.rs b/tests/ui/feature-gates/feature-gate-doc_cfg.rs
index 83053e8c8bf..213a5a8c5a9 100644
--- a/tests/ui/feature-gates/feature-gate-doc_cfg.rs
+++ b/tests/ui/feature-gates/feature-gate-doc_cfg.rs
@@ -1,6 +1,2 @@
-//@ build-pass
-
-// FIXME: Remove this test once `doc_cfg` feature is completely removed.
-
-#[doc(cfg(unix))]
+#[doc(cfg(unix))] //~ ERROR
 fn main() {}
diff --git a/tests/ui/feature-gates/feature-gate-doc_cfg.stderr b/tests/ui/feature-gates/feature-gate-doc_cfg.stderr
new file mode 100644
index 00000000000..5315aaeeb3e
--- /dev/null
+++ b/tests/ui/feature-gates/feature-gate-doc_cfg.stderr
@@ -0,0 +1,13 @@
+error[E0658]: `#[doc(cfg)]` is experimental
+  --> $DIR/feature-gate-doc_cfg.rs:1:1
+   |
+LL | #[doc(cfg(unix))]
+   | ^^^^^^^^^^^^^^^^^
+   |
+   = note: see issue #43781 <https://github.com/rust-lang/rust/issues/43781> for more information
+   = help: add `#![feature(doc_cfg)]` to the crate attributes to enable
+   = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0658`.