about summary refs log tree commit diff
path: root/tests/rustdoc-ui/doctest/unstable-opts-147276.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/rustdoc-ui/doctest/unstable-opts-147276.rs')
-rw-r--r--tests/rustdoc-ui/doctest/unstable-opts-147276.rs17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/rustdoc-ui/doctest/unstable-opts-147276.rs b/tests/rustdoc-ui/doctest/unstable-opts-147276.rs
new file mode 100644
index 00000000000..64cafcaaff4
--- /dev/null
+++ b/tests/rustdoc-ui/doctest/unstable-opts-147276.rs
@@ -0,0 +1,17 @@
+// This test verifies that unstable options like `-Zcrate-attr` are respected when `--test` is
+// passed.
+//
+// <https://github.com/rust-lang/rust/issues/147276>
+//
+// NOTE: If any of these command line arguments or features get stabilized, please replace with
+// another unstable one.
+
+//@ revisions: normal crate_attr
+//@ compile-flags: --test
+//@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME"
+//@[crate_attr] check-pass
+//@[crate_attr] compile-flags: -Zcrate-attr=feature(used_with_arg)
+
+#[used(linker)]
+//[normal]~^ ERROR `#[used(linker)]` is currently unstable
+static REPRO: isize = 1;