summaryrefslogtreecommitdiffstats
path: root/tests/run-make/unstable-flag-required
diff options
context:
space:
mode:
Diffstat (limited to 'tests/run-make/unstable-flag-required')
-rw-r--r--tests/run-make/unstable-flag-required/Makefile4
-rw-r--r--tests/run-make/unstable-flag-required/README.md3
-rw-r--r--tests/run-make/unstable-flag-required/output-format-json.stderr2
-rw-r--r--tests/run-make/unstable-flag-required/x.rs1
4 files changed, 10 insertions, 0 deletions
diff --git a/tests/run-make/unstable-flag-required/Makefile b/tests/run-make/unstable-flag-required/Makefile
new file mode 100644
index 000000000..d3a734fae
--- /dev/null
+++ b/tests/run-make/unstable-flag-required/Makefile
@@ -0,0 +1,4 @@
+include ../../run-make-fulldeps/tools.mk
+
+all:
+ $(RUSTDOC) --output-format=json x.html 2>&1 | diff - output-format-json.stderr
diff --git a/tests/run-make/unstable-flag-required/README.md b/tests/run-make/unstable-flag-required/README.md
new file mode 100644
index 000000000..e5251fdf9
--- /dev/null
+++ b/tests/run-make/unstable-flag-required/README.md
@@ -0,0 +1,3 @@
+This is a collection of tests that verify `--unstable-options` is required.
+It should eventually be removed in favor of UI tests once compiletest stops
+passing --unstable-options by default (#82639).
diff --git a/tests/run-make/unstable-flag-required/output-format-json.stderr b/tests/run-make/unstable-flag-required/output-format-json.stderr
new file mode 100644
index 000000000..fb4079beb
--- /dev/null
+++ b/tests/run-make/unstable-flag-required/output-format-json.stderr
@@ -0,0 +1,2 @@
+error: the -Z unstable-options flag must be passed to enable --output-format for documentation generation (see https://github.com/rust-lang/rust/issues/76578)
+
diff --git a/tests/run-make/unstable-flag-required/x.rs b/tests/run-make/unstable-flag-required/x.rs
new file mode 100644
index 000000000..5df757613
--- /dev/null
+++ b/tests/run-make/unstable-flag-required/x.rs
@@ -0,0 +1 @@
+// nothing to see here