Skip to content

Commit bcc309f

Browse files
committed
base tests: switch to nightly toolchain before checking formatting of tests with rustfmt
this errored because rustfmt is not available on the master toolchain
1 parent 721f688 commit bcc309f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

ci/base-tests.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,13 @@ set +x
4242

4343
# some lints are sensitive to formatting, exclude some files
4444
needs_formatting=false
45+
# switch to nightly
46+
rustup default nightly
4547
for file in `find tests -not -path "tests/ui/methods.rs" -not -path "tests/ui/format.rs" -not -path "tests/ui/formatting.rs" -not -path "tests/ui/empty_line_after_outer_attribute.rs" -not -path "tests/ui/double_parens.rs" -not -path "tests/ui/doc.rs" -not -path "tests/ui/unused_unit.rs" | grep "\.rs$"` ; do
4648
rustfmt ${file} --check || echo "${file} needs reformatting!" ; needs_formatting=true
4749
done
50+
# switch back to master
51+
rustup default master
4852

4953
if [ "${needs_reformatting}" = true ] ; then
5054
echo "Tests need reformatting!"

0 commit comments

Comments
 (0)