tests/hghave.py
changeset 43819 e8a3bbffdc7d
parent 43699 21e05aabef8c
child 44119 5b38c2ab6ad3
--- a/tests/hghave.py	Sat Dec 07 13:06:25 2019 -0800
+++ b/tests/hghave.py	Sat Dec 07 13:07:25 2019 -0800
@@ -1015,3 +1015,11 @@
     version = matchoutput(pytypecmd, b'[0-9a-b.]+')
     sv = distutils.version.StrictVersion
     return version and sv(_strpath(version.group(0))) >= sv('2019.10.17')
+
+
+@check("rustfmt", "rustfmt tool")
+def has_rustfmt():
+    # We use Nightly's rustfmt due to current unstable config options.
+    return matchoutput(
+        '`rustup which --toolchain nightly rustfmt` --version', b'rustfmt'
+    )