about summary refs log tree commit diff
diff options
context:
space:
mode:
authorRyan Levick <me@ryanlevick.com>2021-06-03 10:18:38 +0200
committerRyan Levick <me@ryanlevick.com>2021-06-03 10:18:38 +0200
commit81da9b48aafa49bcd8f9394210a58fa51460b672 (patch)
tree4084c4770b85429ed5b06f21469522075f1bc83f
parentab419314e95b26d6e8662f896508b5efe3fcc3a3 (diff)
downloadrust-81da9b48aafa49bcd8f9394210a58fa51460b672.tar.gz
rust-81da9b48aafa49bcd8f9394210a58fa51460b672.zip
Add run-make test testing flag stability
-rw-r--r--src/doc/unstable-book/src/compiler-flags/force-warns.md2
-rw-r--r--src/test/run-make/unstable-flag-required/Makefile1
-rw-r--r--src/test/run-make/unstable-flag-required/force-warns.stderr2
3 files changed, 4 insertions, 1 deletions
diff --git a/src/doc/unstable-book/src/compiler-flags/force-warns.md b/src/doc/unstable-book/src/compiler-flags/force-warns.md
index 0028c25beb4..0a205be096c 100644
--- a/src/doc/unstable-book/src/compiler-flags/force-warns.md
+++ b/src/doc/unstable-book/src/compiler-flags/force-warns.md
@@ -12,7 +12,7 @@ This feature allows you to cause any lint to produce a warning even if the lint
 #![allow(dead_code)]
 
 fn dead_function() {}
-// This would normally not produce a warning even though the 
+// This would normally not produce a warning even though the
 // function is not used, because dead code is being allowed
 
 fn main() {}
diff --git a/src/test/run-make/unstable-flag-required/Makefile b/src/test/run-make/unstable-flag-required/Makefile
index b8769d5f690..aa20d6aa4bf 100644
--- a/src/test/run-make/unstable-flag-required/Makefile
+++ b/src/test/run-make/unstable-flag-required/Makefile
@@ -2,3 +2,4 @@
 
 all:
 	$(RUSTDOC) --output-format=json x.html 2>&1 | diff - output-format-json.stderr
+	$(RUSTC) --force-warns dead_code x.rs 2>&1 | diff - force-warns.stderr
diff --git a/src/test/run-make/unstable-flag-required/force-warns.stderr b/src/test/run-make/unstable-flag-required/force-warns.stderr
new file mode 100644
index 00000000000..e0936196a11
--- /dev/null
+++ b/src/test/run-make/unstable-flag-required/force-warns.stderr
@@ -0,0 +1,2 @@
+error: the `-Z unstable-options` flag must also be passed to enable the flag `--force-warns=lints`
+