diff --git a/src/test/ui/compiletest-compile-flags-last.rs b/src/test/ui/compiletest-compile-flags-last.rs new file mode 100644 index 000000000000..9c78e4c5e9d8 --- /dev/null +++ b/src/test/ui/compiletest-compile-flags-last.rs @@ -0,0 +1,6 @@ +// Check that the arguments provided through `// compile-flags` are added last to the command line +// in UI tests. To ensure that we invoke rustc with a flag that expects an argument withut actually +// providing it. If the compile-flags are not last, the test will fail as rustc will interpret the +// next flag as the argument of this flag. +// +// compile-flags: --cap-lints diff --git a/src/test/ui/compiletest-compile-flags-last.stderr b/src/test/ui/compiletest-compile-flags-last.stderr new file mode 100644 index 000000000000..d8d40a7d9f11 --- /dev/null +++ b/src/test/ui/compiletest-compile-flags-last.stderr @@ -0,0 +1,2 @@ +error: Argument to option 'cap-lints' missing + diff --git a/src/tools/tidy/src/ui_tests.rs b/src/tools/tidy/src/ui_tests.rs index c600f99c2c4b..d307d6f43b14 100644 --- a/src/tools/tidy/src/ui_tests.rs +++ b/src/tools/tidy/src/ui_tests.rs @@ -7,7 +7,7 @@ use std::path::Path; const ENTRY_LIMIT: usize = 1000; // FIXME: The following limits should be reduced eventually. -const ROOT_ENTRY_LIMIT: usize = 948; +const ROOT_ENTRY_LIMIT: usize = 949; const ISSUES_ENTRY_LIMIT: usize = 2117; fn check_entries(path: &Path, bad: &mut bool) {