diff options
-rw-r--r-- | Cargo.lock | 148 | ||||
-rw-r--r-- | crates/ra_tools/Cargo.toml | 1 | ||||
-rw-r--r-- | crates/ra_tools/src/lib.rs | 28 |
3 files changed, 25 insertions, 152 deletions
diff --git a/Cargo.lock b/Cargo.lock index 05d340e5f..4ef0134d7 100644 --- a/Cargo.lock +++ b/Cargo.lock | |||
@@ -353,11 +353,6 @@ dependencies = [ | |||
353 | ] | 353 | ] |
354 | 354 | ||
355 | [[package]] | 355 | [[package]] |
356 | name = "deunicode" | ||
357 | version = "0.4.3" | ||
358 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
359 | |||
360 | [[package]] | ||
361 | name = "difference" | 356 | name = "difference" |
362 | version = "2.0.0" | 357 | version = "2.0.0" |
363 | source = "registry+https://github.com/rust-lang/crates.io-index" | 358 | source = "registry+https://github.com/rust-lang/crates.io-index" |
@@ -407,15 +402,6 @@ version = "0.3.5" | |||
407 | source = "registry+https://github.com/rust-lang/crates.io-index" | 402 | source = "registry+https://github.com/rust-lang/crates.io-index" |
408 | 403 | ||
409 | [[package]] | 404 | [[package]] |
410 | name = "error-chain" | ||
411 | version = "0.12.1" | ||
412 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
413 | dependencies = [ | ||
414 | "backtrace 0.3.34 (registry+https://github.com/rust-lang/crates.io-index)", | ||
415 | "version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", | ||
416 | ] | ||
417 | |||
418 | [[package]] | ||
419 | name = "failure" | 405 | name = "failure" |
420 | version = "0.1.5" | 406 | version = "0.1.5" |
421 | source = "registry+https://github.com/rust-lang/crates.io-index" | 407 | source = "registry+https://github.com/rust-lang/crates.io-index" |
@@ -558,11 +544,6 @@ dependencies = [ | |||
558 | 544 | ||
559 | [[package]] | 545 | [[package]] |
560 | name = "glob" | 546 | name = "glob" |
561 | version = "0.2.11" | ||
562 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
563 | |||
564 | [[package]] | ||
565 | name = "glob" | ||
566 | version = "0.3.0" | 547 | version = "0.3.0" |
567 | source = "registry+https://github.com/rust-lang/crates.io-index" | 548 | source = "registry+https://github.com/rust-lang/crates.io-index" |
568 | 549 | ||
@@ -587,21 +568,6 @@ dependencies = [ | |||
587 | ] | 568 | ] |
588 | 569 | ||
589 | [[package]] | 570 | [[package]] |
590 | name = "humansize" | ||
591 | version = "1.1.0" | ||
592 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
593 | |||
594 | [[package]] | ||
595 | name = "idna" | ||
596 | version = "0.1.5" | ||
597 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
598 | dependencies = [ | ||
599 | "matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", | ||
600 | "unicode-bidi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", | ||
601 | "unicode-normalization 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", | ||
602 | ] | ||
603 | |||
604 | [[package]] | ||
605 | name = "idna" | 571 | name = "idna" |
606 | version = "0.2.0" | 572 | version = "0.2.0" |
607 | source = "registry+https://github.com/rust-lang/crates.io-index" | 573 | source = "registry+https://github.com/rust-lang/crates.io-index" |
@@ -1009,11 +975,6 @@ dependencies = [ | |||
1009 | 975 | ||
1010 | [[package]] | 976 | [[package]] |
1011 | name = "percent-encoding" | 977 | name = "percent-encoding" |
1012 | version = "1.0.1" | ||
1013 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
1014 | |||
1015 | [[package]] | ||
1016 | name = "percent-encoding" | ||
1017 | version = "2.1.0" | 978 | version = "2.1.0" |
1018 | source = "registry+https://github.com/rust-lang/crates.io-index" | 979 | source = "registry+https://github.com/rust-lang/crates.io-index" |
1019 | 980 | ||
@@ -1368,7 +1329,6 @@ dependencies = [ | |||
1368 | "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", | 1329 | "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", |
1369 | "ron 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", | 1330 | "ron 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", |
1370 | "serde 1.0.99 (registry+https://github.com/rust-lang/crates.io-index)", | 1331 | "serde 1.0.99 (registry+https://github.com/rust-lang/crates.io-index)", |
1371 | "teraron 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", | ||
1372 | "walkdir 2.2.9 (registry+https://github.com/rust-lang/crates.io-index)", | 1332 | "walkdir 2.2.9 (registry+https://github.com/rust-lang/crates.io-index)", |
1373 | ] | 1333 | ] |
1374 | 1334 | ||
@@ -1784,14 +1744,6 @@ version = "0.4.2" | |||
1784 | source = "registry+https://github.com/rust-lang/crates.io-index" | 1744 | source = "registry+https://github.com/rust-lang/crates.io-index" |
1785 | 1745 | ||
1786 | [[package]] | 1746 | [[package]] |
1787 | name = "slug" | ||
1788 | version = "0.1.4" | ||
1789 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
1790 | dependencies = [ | ||
1791 | "deunicode 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", | ||
1792 | ] | ||
1793 | |||
1794 | [[package]] | ||
1795 | name = "smallvec" | 1747 | name = "smallvec" |
1796 | version = "0.6.10" | 1748 | version = "0.6.10" |
1797 | source = "registry+https://github.com/rust-lang/crates.io-index" | 1749 | source = "registry+https://github.com/rust-lang/crates.io-index" |
@@ -1870,36 +1822,6 @@ dependencies = [ | |||
1870 | ] | 1822 | ] |
1871 | 1823 | ||
1872 | [[package]] | 1824 | [[package]] |
1873 | name = "tera" | ||
1874 | version = "0.11.20" | ||
1875 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
1876 | dependencies = [ | ||
1877 | "chrono 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)", | ||
1878 | "error-chain 0.12.1 (registry+https://github.com/rust-lang/crates.io-index)", | ||
1879 | "glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", | ||
1880 | "humansize 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", | ||
1881 | "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", | ||
1882 | "pest 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)", | ||
1883 | "pest_derive 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", | ||
1884 | "regex 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", | ||
1885 | "serde 1.0.99 (registry+https://github.com/rust-lang/crates.io-index)", | ||
1886 | "serde_json 1.0.40 (registry+https://github.com/rust-lang/crates.io-index)", | ||
1887 | "slug 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", | ||
1888 | "unic-segment 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", | ||
1889 | "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)", | ||
1890 | ] | ||
1891 | |||
1892 | [[package]] | ||
1893 | name = "teraron" | ||
1894 | version = "0.1.0" | ||
1895 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
1896 | dependencies = [ | ||
1897 | "heck 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", | ||
1898 | "ron 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", | ||
1899 | "tera 0.11.20 (registry+https://github.com/rust-lang/crates.io-index)", | ||
1900 | ] | ||
1901 | |||
1902 | [[package]] | ||
1903 | name = "termios" | 1825 | name = "termios" |
1904 | version = "0.3.1" | 1826 | version = "0.3.1" |
1905 | source = "registry+https://github.com/rust-lang/crates.io-index" | 1827 | source = "registry+https://github.com/rust-lang/crates.io-index" |
@@ -1974,50 +1896,6 @@ version = "0.1.2" | |||
1974 | source = "registry+https://github.com/rust-lang/crates.io-index" | 1896 | source = "registry+https://github.com/rust-lang/crates.io-index" |
1975 | 1897 | ||
1976 | [[package]] | 1898 | [[package]] |
1977 | name = "unic-char-property" | ||
1978 | version = "0.7.0" | ||
1979 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
1980 | dependencies = [ | ||
1981 | "unic-char-range 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", | ||
1982 | ] | ||
1983 | |||
1984 | [[package]] | ||
1985 | name = "unic-char-range" | ||
1986 | version = "0.7.0" | ||
1987 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
1988 | |||
1989 | [[package]] | ||
1990 | name = "unic-common" | ||
1991 | version = "0.7.0" | ||
1992 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
1993 | |||
1994 | [[package]] | ||
1995 | name = "unic-segment" | ||
1996 | version = "0.7.0" | ||
1997 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
1998 | dependencies = [ | ||
1999 | "unic-ucd-segment 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", | ||
2000 | ] | ||
2001 | |||
2002 | [[package]] | ||
2003 | name = "unic-ucd-segment" | ||
2004 | version = "0.7.0" | ||
2005 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
2006 | dependencies = [ | ||
2007 | "unic-char-property 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", | ||
2008 | "unic-char-range 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", | ||
2009 | "unic-ucd-version 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", | ||
2010 | ] | ||
2011 | |||
2012 | [[package]] | ||
2013 | name = "unic-ucd-version" | ||
2014 | version = "0.7.0" | ||
2015 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
2016 | dependencies = [ | ||
2017 | "unic-common 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", | ||
2018 | ] | ||
2019 | |||
2020 | [[package]] | ||
2021 | name = "unicase" | 1899 | name = "unicase" |
2022 | version = "2.4.0" | 1900 | version = "2.4.0" |
2023 | source = "registry+https://github.com/rust-lang/crates.io-index" | 1901 | source = "registry+https://github.com/rust-lang/crates.io-index" |
@@ -2063,16 +1941,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" | |||
2063 | 1941 | ||
2064 | [[package]] | 1942 | [[package]] |
2065 | name = "url" | 1943 | name = "url" |
2066 | version = "1.7.2" | ||
2067 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
2068 | dependencies = [ | ||
2069 | "idna 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", | ||
2070 | "matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", | ||
2071 | "percent-encoding 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", | ||
2072 | ] | ||
2073 | |||
2074 | [[package]] | ||
2075 | name = "url" | ||
2076 | version = "2.1.0" | 1944 | version = "2.1.0" |
2077 | source = "registry+https://github.com/rust-lang/crates.io-index" | 1945 | source = "registry+https://github.com/rust-lang/crates.io-index" |
2078 | dependencies = [ | 1946 | dependencies = [ |
@@ -2215,7 +2083,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" | |||
2215 | "checksum crossbeam-queue 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7c979cd6cfe72335896575c6b5688da489e420d36a27a0b9eb0c73db574b4a4b" | 2083 | "checksum crossbeam-queue 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7c979cd6cfe72335896575c6b5688da489e420d36a27a0b9eb0c73db574b4a4b" |
2216 | "checksum crossbeam-utils 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)" = "04973fa96e96579258a5091af6003abde64af786b860f18622b82e026cca60e6" | 2084 | "checksum crossbeam-utils 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)" = "04973fa96e96579258a5091af6003abde64af786b860f18622b82e026cca60e6" |
2217 | "checksum derive-new 0.5.7 (registry+https://github.com/rust-lang/crates.io-index)" = "c3fd04571b29c91cfbe1e7c9a228e069ac8635f180ffb4ccd6a6907617ee8bb0" | 2085 | "checksum derive-new 0.5.7 (registry+https://github.com/rust-lang/crates.io-index)" = "c3fd04571b29c91cfbe1e7c9a228e069ac8635f180ffb4ccd6a6907617ee8bb0" |
2218 | "checksum deunicode 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "850878694b7933ca4c9569d30a34b55031b9b139ee1fc7b94a527c4ef960d690" | ||
2219 | "checksum difference 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "524cbf6897b527295dff137cec09ecf3a05f4fddffd7dfcd1585403449e74198" | 2086 | "checksum difference 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "524cbf6897b527295dff137cec09ecf3a05f4fddffd7dfcd1585403449e74198" |
2220 | "checksum digest 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f3d0c8c8752312f9713efd397ff63acb9f85585afbf179282e720e7704954dd5" | 2087 | "checksum digest 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f3d0c8c8752312f9713efd397ff63acb9f85585afbf179282e720e7704954dd5" |
2221 | "checksum drop_bomb 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "69b26e475fd29098530e709294e94e661974c851aed42512793f120fed4e199f" | 2088 | "checksum drop_bomb 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "69b26e475fd29098530e709294e94e661974c851aed42512793f120fed4e199f" |
@@ -2224,7 +2091,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" | |||
2224 | "checksum ena 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)" = "25b4e5febb25f08c49f1b07dc33a182729a6b21edfb562b5aef95f78e0dbe5bb" | 2091 | "checksum ena 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)" = "25b4e5febb25f08c49f1b07dc33a182729a6b21edfb562b5aef95f78e0dbe5bb" |
2225 | "checksum ena 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3dc01d68e08ca384955a3aeba9217102ca1aa85b6e168639bf27739f1d749d87" | 2092 | "checksum ena 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3dc01d68e08ca384955a3aeba9217102ca1aa85b6e168639bf27739f1d749d87" |
2226 | "checksum encode_unicode 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "90b2c9496c001e8cb61827acdefad780795c42264c137744cae6f7d9e3450abd" | 2093 | "checksum encode_unicode 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "90b2c9496c001e8cb61827acdefad780795c42264c137744cae6f7d9e3450abd" |
2227 | "checksum error-chain 0.12.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3ab49e9dcb602294bc42f9a7dfc9bc6e936fca4418ea300dbfb84fe16de0b7d9" | ||
2228 | "checksum failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "795bd83d3abeb9220f257e597aa0080a508b27533824adf336529648f6abf7e2" | 2094 | "checksum failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "795bd83d3abeb9220f257e597aa0080a508b27533824adf336529648f6abf7e2" |
2229 | "checksum failure_derive 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "ea1063915fd7ef4309e222a5a07cf9c319fb9c7836b1f89b85458672dbb127e1" | 2095 | "checksum failure_derive 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "ea1063915fd7ef4309e222a5a07cf9c319fb9c7836b1f89b85458672dbb127e1" |
2230 | "checksum fake-simd 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e88a8acf291dafb59c2d96e8f59828f3838bb1a70398823ade51a84de6a6deed" | 2096 | "checksum fake-simd 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e88a8acf291dafb59c2d96e8f59828f3838bb1a70398823ade51a84de6a6deed" |
@@ -2242,12 +2108,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" | |||
2242 | "checksum fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7" | 2108 | "checksum fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7" |
2243 | "checksum generic-array 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)" = "c68f0274ae0e023facc3c97b2e00f076be70e254bc851d972503b328db79b2ec" | 2109 | "checksum generic-array 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)" = "c68f0274ae0e023facc3c97b2e00f076be70e254bc851d972503b328db79b2ec" |
2244 | "checksum getrandom 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "2512b3191f22e2763a5db387f1c9409379772e2050841722eb4a8c4f497bf096" | 2110 | "checksum getrandom 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "2512b3191f22e2763a5db387f1c9409379772e2050841722eb4a8c4f497bf096" |
2245 | "checksum glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "8be18de09a56b60ed0edf84bc9df007e30040691af7acd1c41874faac5895bfb" | ||
2246 | "checksum glob 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "9b919933a397b79c37e33b77bb2aa3dc8eb6e165ad809e58ff75bc7db2e34574" | 2111 | "checksum glob 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "9b919933a397b79c37e33b77bb2aa3dc8eb6e165ad809e58ff75bc7db2e34574" |
2247 | "checksum globset 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "925aa2cac82d8834e2b2a4415b6f6879757fb5c0928fc445ae76461a12eed8f2" | 2112 | "checksum globset 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "925aa2cac82d8834e2b2a4415b6f6879757fb5c0928fc445ae76461a12eed8f2" |
2248 | "checksum heck 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "20564e78d53d2bb135c343b3f47714a56af2061f1c928fdb541dc7b9fdd94205" | 2113 | "checksum heck 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "20564e78d53d2bb135c343b3f47714a56af2061f1c928fdb541dc7b9fdd94205" |
2249 | "checksum humansize 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b6cab2627acfc432780848602f3f558f7e9dd427352224b0d9324025796d2a5e" | ||
2250 | "checksum idna 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "38f09e0f0b1fb55fdee1f17470ad800da77af5186a1a76c026b679358b7e844e" | ||
2251 | "checksum idna 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "02e2673c30ee86b5b96a9cb52ad15718aa1f966f5ab9ad54a8b95d5ca33120a9" | 2114 | "checksum idna 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "02e2673c30ee86b5b96a9cb52ad15718aa1f966f5ab9ad54a8b95d5ca33120a9" |
2252 | "checksum indexmap 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7e81a7c05f79578dbc15793d8b619db9ba32b4577003ef3af1a91c416798c58d" | 2115 | "checksum indexmap 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7e81a7c05f79578dbc15793d8b619db9ba32b4577003ef3af1a91c416798c58d" |
2253 | "checksum indicatif 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2c60da1c9abea75996b70a931bba6c750730399005b61ccd853cee50ef3d0d0c" | 2116 | "checksum indicatif 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2c60da1c9abea75996b70a931bba6c750730399005b61ccd853cee50ef3d0d0c" |
@@ -2294,7 +2157,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" | |||
2294 | "checksum parking_lot_core 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "b876b1b9e7ac6e1a74a6da34d25c42e17e8862aa409cbbbdcfc8d86c6f3bc62b" | 2157 | "checksum parking_lot_core 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "b876b1b9e7ac6e1a74a6da34d25c42e17e8862aa409cbbbdcfc8d86c6f3bc62b" |
2295 | "checksum paste 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "423a519e1c6e828f1e73b720f9d9ed2fa643dce8a7737fb43235ce0b41eeaa49" | 2158 | "checksum paste 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "423a519e1c6e828f1e73b720f9d9ed2fa643dce8a7737fb43235ce0b41eeaa49" |
2296 | "checksum paste-impl 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "4214c9e912ef61bf42b81ba9a47e8aad1b2ffaf739ab162bf96d1e011f54e6c5" | 2159 | "checksum paste-impl 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "4214c9e912ef61bf42b81ba9a47e8aad1b2ffaf739ab162bf96d1e011f54e6c5" |
2297 | "checksum percent-encoding 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "31010dd2e1ac33d5b46a5b413495239882813e0369f8ed8a5e266f173602f831" | ||
2298 | "checksum percent-encoding 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e" | 2160 | "checksum percent-encoding 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e" |
2299 | "checksum pest 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "933085deae3f32071f135d799d75667b63c8dc1f4537159756e3d4ceab41868c" | 2161 | "checksum pest 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "933085deae3f32071f135d799d75667b63c8dc1f4537159756e3d4ceab41868c" |
2300 | "checksum pest_derive 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "833d1ae558dc601e9a60366421196a8d94bc0ac980476d0b67e1d0988d72b2d0" | 2162 | "checksum pest_derive 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "833d1ae558dc601e9a60366421196a8d94bc0ac980476d0b67e1d0988d72b2d0" |
@@ -2354,7 +2216,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" | |||
2354 | "checksum serde_yaml 0.8.9 (registry+https://github.com/rust-lang/crates.io-index)" = "38b08a9a90e5260fe01c6480ec7c811606df6d3a660415808c3c3fa8ed95b582" | 2216 | "checksum serde_yaml 0.8.9 (registry+https://github.com/rust-lang/crates.io-index)" = "38b08a9a90e5260fe01c6480ec7c811606df6d3a660415808c3c3fa8ed95b582" |
2355 | "checksum sha-1 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "23962131a91661d643c98940b20fcaffe62d776a823247be80a48fcb8b6fce68" | 2217 | "checksum sha-1 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "23962131a91661d643c98940b20fcaffe62d776a823247be80a48fcb8b6fce68" |
2356 | "checksum slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c111b5bd5695e56cffe5129854aa230b39c93a305372fdbb2668ca2394eea9f8" | 2218 | "checksum slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c111b5bd5695e56cffe5129854aa230b39c93a305372fdbb2668ca2394eea9f8" |
2357 | "checksum slug 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "b3bc762e6a4b6c6fcaade73e77f9ebc6991b676f88bb2358bddb56560f073373" | ||
2358 | "checksum smallvec 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)" = "ab606a9c5e214920bb66c458cd7be8ef094f813f20fe77a54cc7dbfff220d4b7" | 2219 | "checksum smallvec 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)" = "ab606a9c5e214920bb66c458cd7be8ef094f813f20fe77a54cc7dbfff220d4b7" |
2359 | "checksum smol_str 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)" = "590700be3630457c56f8c73c0ea39881476ad7076cd84057d44f4f38f79914fb" | 2220 | "checksum smol_str 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)" = "590700be3630457c56f8c73c0ea39881476ad7076cd84057d44f4f38f79914fb" |
2360 | "checksum stacker 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "fb79482f57cf598af52094ec4cc3b3c42499d3ce5bd426f2ac41515b7e57404b" | 2221 | "checksum stacker 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "fb79482f57cf598af52094ec4cc3b3c42499d3ce5bd426f2ac41515b7e57404b" |
@@ -2364,8 +2225,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" | |||
2364 | "checksum syn 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "2ae5cd13590144ea968ba5d5520da7a4c08415861014399b5b349f74591c375f" | 2225 | "checksum syn 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "2ae5cd13590144ea968ba5d5520da7a4c08415861014399b5b349f74591c375f" |
2365 | "checksum synstructure 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)" = "02353edf96d6e4dc81aea2d8490a7e9db177bf8acb0e951c24940bf866cb313f" | 2226 | "checksum synstructure 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)" = "02353edf96d6e4dc81aea2d8490a7e9db177bf8acb0e951c24940bf866cb313f" |
2366 | "checksum tempfile 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7a6e24d9338a0a5be79593e2fa15a648add6138caa803e2d5bc782c371732ca9" | 2227 | "checksum tempfile 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7a6e24d9338a0a5be79593e2fa15a648add6138caa803e2d5bc782c371732ca9" |
2367 | "checksum tera 0.11.20 (registry+https://github.com/rust-lang/crates.io-index)" = "4b505279e19d8f7d24b1a9dc58327c9c36174b1a2c7ebdeac70792d017cb64f3" | ||
2368 | "checksum teraron 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "9a447d012fef5c222f4b11a98fcef2a7e347a57f28be9957c5c390ac9a0e41e0" | ||
2369 | "checksum termios 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "72b620c5ea021d75a735c943269bb07d30c9b77d6ac6b236bc8b5c496ef05625" | 2228 | "checksum termios 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "72b620c5ea021d75a735c943269bb07d30c9b77d6ac6b236bc8b5c496ef05625" |
2370 | "checksum text_unit 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "e08bbcb7a3adbda0eb23431206b653bdad3d8dea311e72d36bf2215e27a42579" | 2229 | "checksum text_unit 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "e08bbcb7a3adbda0eb23431206b653bdad3d8dea311e72d36bf2215e27a42579" |
2371 | "checksum textwrap 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060" | 2230 | "checksum textwrap 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060" |
@@ -2374,12 +2233,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" | |||
2374 | "checksum time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)" = "db8dcfca086c1143c9270ac42a2bbd8a7ee477b78ac8e45b19abfb0cbede4b6f" | 2233 | "checksum time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)" = "db8dcfca086c1143c9270ac42a2bbd8a7ee477b78ac8e45b19abfb0cbede4b6f" |
2375 | "checksum typenum 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "612d636f949607bdf9b123b4a6f6d966dedf3ff669f7f045890d3a4a73948169" | 2234 | "checksum typenum 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "612d636f949607bdf9b123b4a6f6d966dedf3ff669f7f045890d3a4a73948169" |
2376 | "checksum ucd-trie 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "8f00ed7be0c1ff1e24f46c3d2af4859f7e863672ba3a6e92e7cff702bf9f06c2" | 2235 | "checksum ucd-trie 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "8f00ed7be0c1ff1e24f46c3d2af4859f7e863672ba3a6e92e7cff702bf9f06c2" |
2377 | "checksum unic-char-property 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ce36d3f7ce754afdbccccf8ff0dd0134e50fb44aaae579f96218856e9e5dbd1e" | ||
2378 | "checksum unic-char-range 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d9ab85fab42ad1b26cafc03bf891f69cb4d6e15f491030e89a0122197baa8ae8" | ||
2379 | "checksum unic-common 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ff8d4a7ade929ef7d971e16ced21a8cd56a63869aa6032dfb8cb083cf7d077bf" | ||
2380 | "checksum unic-segment 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c9ca47cbb09fb5fcd066b5867d11dc528302fa465277882797d6a836e1ee6f9e" | ||
2381 | "checksum unic-ucd-segment 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "48f1a08ce0409a9e391b88d1930118eec48af12742fc538bcec55f775865776e" | ||
2382 | "checksum unic-ucd-version 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "cf1f5e6c6c53c2d0ece4a5964bc55fcff8602153063cb4fab20958ff32998ff6" | ||
2383 | "checksum unicase 2.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a84e5511b2a947f3ae965dcb29b13b7b1691b6e7332cf5dbc1744138d5acb7f6" | 2236 | "checksum unicase 2.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a84e5511b2a947f3ae965dcb29b13b7b1691b6e7332cf5dbc1744138d5acb7f6" |
2384 | "checksum unicode-bidi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "49f2bd0c6468a8230e1db229cff8029217cf623c767ea5d60bfbd42729ea54d5" | 2237 | "checksum unicode-bidi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "49f2bd0c6468a8230e1db229cff8029217cf623c767ea5d60bfbd42729ea54d5" |
2385 | "checksum unicode-normalization 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "141339a08b982d942be2ca06ff8b076563cbe223d1befd5450716790d44e2426" | 2238 | "checksum unicode-normalization 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "141339a08b982d942be2ca06ff8b076563cbe223d1befd5450716790d44e2426" |
@@ -2387,7 +2240,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" | |||
2387 | "checksum unicode-width 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "882386231c45df4700b275c7ff55b6f3698780a650026380e72dabe76fa46526" | 2240 | "checksum unicode-width 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "882386231c45df4700b275c7ff55b6f3698780a650026380e72dabe76fa46526" |
2388 | "checksum unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc" | 2241 | "checksum unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc" |
2389 | "checksum unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "826e7639553986605ec5979c7dd957c7895e93eabed50ab2ffa7f6128a75097c" | 2242 | "checksum unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "826e7639553986605ec5979c7dd957c7895e93eabed50ab2ffa7f6128a75097c" |
2390 | "checksum url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)" = "dd4e7c0d531266369519a4aa4f399d748bd37043b00bde1e4ff1f60a120b355a" | ||
2391 | "checksum url 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "75b414f6c464c879d7f9babf951f23bc3743fb7313c081b2e6ca719067ea9d61" | 2243 | "checksum url 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "75b414f6c464c879d7f9babf951f23bc3743fb7313c081b2e6ca719067ea9d61" |
2392 | "checksum uuid 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)" = "90dbc611eb48397705a6b0f6e917da23ae517e4d127123d2cf7674206627d32a" | 2244 | "checksum uuid 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)" = "90dbc611eb48397705a6b0f6e917da23ae517e4d127123d2cf7674206627d32a" |
2393 | "checksum vec_map 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "05c78687fb1a80548ae3250346c3db86a80a7cdd77bda190189f2d0a0987c81a" | 2245 | "checksum vec_map 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "05c78687fb1a80548ae3250346c3db86a80a7cdd77bda190189f2d0a0987c81a" |
diff --git a/crates/ra_tools/Cargo.toml b/crates/ra_tools/Cargo.toml index a40a452aa..4c9aa1cc3 100644 --- a/crates/ra_tools/Cargo.toml +++ b/crates/ra_tools/Cargo.toml | |||
@@ -6,7 +6,6 @@ authors = ["rust-analyzer developers"] | |||
6 | publish = false | 6 | publish = false |
7 | 7 | ||
8 | [dependencies] | 8 | [dependencies] |
9 | teraron = "0.1.0" | ||
10 | walkdir = "2.1.3" | 9 | walkdir = "2.1.3" |
11 | itertools = "0.8.0" | 10 | itertools = "0.8.0" |
12 | clap = "2.32.0" | 11 | clap = "2.32.0" |
diff --git a/crates/ra_tools/src/lib.rs b/crates/ra_tools/src/lib.rs index de8c472d1..c02dee953 100644 --- a/crates/ra_tools/src/lib.rs +++ b/crates/ra_tools/src/lib.rs | |||
@@ -11,8 +11,6 @@ use std::{ | |||
11 | 11 | ||
12 | use itertools::Itertools; | 12 | use itertools::Itertools; |
13 | 13 | ||
14 | pub use teraron::{Mode, Overwrite, Verify}; | ||
15 | |||
16 | pub use self::codegen::generate; | 14 | pub use self::codegen::generate; |
17 | 15 | ||
18 | pub type Result<T> = std::result::Result<T, Box<dyn Error>>; | 16 | pub type Result<T> = std::result::Result<T, Box<dyn Error>>; |
@@ -26,6 +24,13 @@ pub const SYNTAX_KINDS: &str = "crates/ra_parser/src/syntax_kind/generated.rs.te | |||
26 | pub const AST: &str = "crates/ra_syntax/src/ast/generated.rs"; | 24 | pub const AST: &str = "crates/ra_syntax/src/ast/generated.rs"; |
27 | const TOOLCHAIN: &str = "stable"; | 25 | const TOOLCHAIN: &str = "stable"; |
28 | 26 | ||
27 | #[derive(Debug, PartialEq, Eq, Clone, Copy)] | ||
28 | pub enum Mode { | ||
29 | Overwrite, | ||
30 | Verify, | ||
31 | } | ||
32 | pub use Mode::*; | ||
33 | |||
29 | #[derive(Debug)] | 34 | #[derive(Debug)] |
30 | pub struct Test { | 35 | pub struct Test { |
31 | pub name: String, | 36 | pub name: String, |
@@ -222,7 +227,7 @@ pub fn gen_tests(mode: Mode) -> Result<()> { | |||
222 | tests_dir.join(file_name) | 227 | tests_dir.join(file_name) |
223 | } | 228 | } |
224 | }; | 229 | }; |
225 | teraron::update(&path, &test.text, mode)?; | 230 | update(&path, &test.text, mode)?; |
226 | } | 231 | } |
227 | Ok(()) | 232 | Ok(()) |
228 | } | 233 | } |
@@ -306,3 +311,20 @@ fn existing_tests(dir: &Path, ok: bool) -> Result<HashMap<String, (PathBuf, Test | |||
306 | } | 311 | } |
307 | Ok(res) | 312 | Ok(res) |
308 | } | 313 | } |
314 | |||
315 | /// A helper to update file on disk if it has changed. | ||
316 | /// With verify = false, | ||
317 | pub fn update(path: &Path, contents: &str, mode: Mode) -> Result<()> { | ||
318 | match fs::read_to_string(path) { | ||
319 | Ok(ref old_contents) if old_contents == contents => { | ||
320 | return Ok(()); | ||
321 | } | ||
322 | _ => (), | ||
323 | } | ||
324 | if mode == Verify { | ||
325 | Err(format!("`{}` is not up-to-date", path.display()))?; | ||
326 | } | ||
327 | eprintln!("updating {}", path.display()); | ||
328 | fs::write(path, contents)?; | ||
329 | Ok(()) | ||
330 | } | ||