@@ -1330,7 +1330,7 @@ pub struct Clippy {
1330
1330
}
1331
1331
1332
1332
impl Step for Clippy {
1333
- type Output = Option < PathBuf > ;
1333
+ type Output = PathBuf ;
1334
1334
const ONLY_HOSTS : bool = true ;
1335
1335
1336
1336
fn should_run ( run : ShouldRun < ' _ > ) -> ShouldRun < ' _ > {
@@ -1348,7 +1348,7 @@ impl Step for Clippy {
1348
1348
} ) ;
1349
1349
}
1350
1350
1351
- fn run ( self , builder : & Builder < ' _ > ) -> Option < PathBuf > {
1351
+ fn run ( self , builder : & Builder < ' _ > ) -> PathBuf {
1352
1352
let compiler = self . compiler ;
1353
1353
let target = self . target ;
1354
1354
assert ! ( builder. config. extended) ;
@@ -1368,16 +1368,10 @@ impl Step for Clippy {
1368
1368
// state for clippy isn't testing.
1369
1369
let clippy = builder
1370
1370
. ensure ( tool:: Clippy { compiler, target, extra_features : Vec :: new ( ) } )
1371
- . or_else ( || {
1372
- missing_tool ( "clippy" , builder. build . config . missing_tools ) ;
1373
- None
1374
- } ) ?;
1371
+ . expect ( "clippy expected to build - essential tool" ) ;
1375
1372
let cargoclippy = builder
1376
1373
. ensure ( tool:: CargoClippy { compiler, target, extra_features : Vec :: new ( ) } )
1377
- . or_else ( || {
1378
- missing_tool ( "cargo clippy" , builder. build . config . missing_tools ) ;
1379
- None
1380
- } ) ?;
1374
+ . expect ( "clippy expected to build - essential tool" ) ;
1381
1375
1382
1376
builder. install ( & clippy, & image. join ( "bin" ) , 0o755 ) ;
1383
1377
builder. install ( & cargoclippy, & image. join ( "bin" ) , 0o755 ) ;
@@ -1416,7 +1410,7 @@ impl Step for Clippy {
1416
1410
builder. info ( & format ! ( "Dist clippy stage{} ({})" , compiler. stage, target) ) ;
1417
1411
let _time = timeit ( builder) ;
1418
1412
builder. run ( & mut cmd) ;
1419
- Some ( distdir ( builder) . join ( format ! ( "{}-{}.tar.gz" , name, target) ) )
1413
+ distdir ( builder) . join ( format ! ( "{}-{}.tar.gz" , name, target) )
1420
1414
}
1421
1415
}
1422
1416
@@ -1683,7 +1677,7 @@ impl Step for Extended {
1683
1677
tarballs. push ( rustc_installer) ;
1684
1678
tarballs. push ( cargo_installer) ;
1685
1679
tarballs. extend ( rls_installer. clone ( ) ) ;
1686
- tarballs. extend ( clippy_installer. clone ( ) ) ;
1680
+ tarballs. push ( clippy_installer) ;
1687
1681
tarballs. extend ( miri_installer. clone ( ) ) ;
1688
1682
tarballs. extend ( rustfmt_installer. clone ( ) ) ;
1689
1683
tarballs. extend ( llvm_tools_installer) ;
@@ -1761,9 +1755,6 @@ impl Step for Extended {
1761
1755
if rls_installer. is_none ( ) {
1762
1756
contents = filter ( & contents, "rls" ) ;
1763
1757
}
1764
- if clippy_installer. is_none ( ) {
1765
- contents = filter ( & contents, "clippy" ) ;
1766
- }
1767
1758
if miri_installer. is_none ( ) {
1768
1759
contents = filter ( & contents, "miri" ) ;
1769
1760
}
@@ -1805,13 +1796,11 @@ impl Step for Extended {
1805
1796
prepare ( "rust-docs" ) ;
1806
1797
prepare ( "rust-std" ) ;
1807
1798
prepare ( "rust-analysis" ) ;
1799
+ prepare ( "clippy" ) ;
1808
1800
1809
1801
if rls_installer. is_some ( ) {
1810
1802
prepare ( "rls" ) ;
1811
1803
}
1812
- if clippy_installer. is_some ( ) {
1813
- prepare ( "clippy" ) ;
1814
- }
1815
1804
if miri_installer. is_some ( ) {
1816
1805
prepare ( "miri" ) ;
1817
1806
}
@@ -1863,12 +1852,10 @@ impl Step for Extended {
1863
1852
prepare ( "rust-analysis" ) ;
1864
1853
prepare ( "rust-docs" ) ;
1865
1854
prepare ( "rust-std" ) ;
1855
+ prepare ( "clippy" ) ;
1866
1856
if rls_installer. is_some ( ) {
1867
1857
prepare ( "rls" ) ;
1868
1858
}
1869
- if clippy_installer. is_some ( ) {
1870
- prepare ( "clippy" ) ;
1871
- }
1872
1859
if miri_installer. is_some ( ) {
1873
1860
prepare ( "miri" ) ;
1874
1861
}
@@ -1989,25 +1976,23 @@ impl Step for Extended {
1989
1976
. arg ( etc. join ( "msi/remove-duplicates.xsl" ) ) ,
1990
1977
) ;
1991
1978
}
1992
- if clippy_installer. is_some ( ) {
1993
- builder. run (
1994
- Command :: new ( & heat)
1995
- . current_dir ( & exe)
1996
- . arg ( "dir" )
1997
- . arg ( "clippy" )
1998
- . args ( & heat_flags)
1999
- . arg ( "-cg" )
2000
- . arg ( "ClippyGroup" )
2001
- . arg ( "-dr" )
2002
- . arg ( "Clippy" )
2003
- . arg ( "-var" )
2004
- . arg ( "var.ClippyDir" )
2005
- . arg ( "-out" )
2006
- . arg ( exe. join ( "ClippyGroup.wxs" ) )
2007
- . arg ( "-t" )
2008
- . arg ( etc. join ( "msi/remove-duplicates.xsl" ) ) ,
2009
- ) ;
2010
- }
1979
+ builder. run (
1980
+ Command :: new ( & heat)
1981
+ . current_dir ( & exe)
1982
+ . arg ( "dir" )
1983
+ . arg ( "clippy" )
1984
+ . args ( & heat_flags)
1985
+ . arg ( "-cg" )
1986
+ . arg ( "ClippyGroup" )
1987
+ . arg ( "-dr" )
1988
+ . arg ( "Clippy" )
1989
+ . arg ( "-var" )
1990
+ . arg ( "var.ClippyDir" )
1991
+ . arg ( "-out" )
1992
+ . arg ( exe. join ( "ClippyGroup.wxs" ) )
1993
+ . arg ( "-t" )
1994
+ . arg ( etc. join ( "msi/remove-duplicates.xsl" ) ) ,
1995
+ ) ;
2011
1996
if miri_installer. is_some ( ) {
2012
1997
builder. run (
2013
1998
Command :: new ( & heat)
@@ -2073,6 +2058,7 @@ impl Step for Extended {
2073
2058
. arg ( "-dCargoDir=cargo" )
2074
2059
. arg ( "-dStdDir=rust-std" )
2075
2060
. arg ( "-dAnalysisDir=rust-analysis" )
2061
+ . arg ( "-dClippyDir=clippy" )
2076
2062
. arg ( "-arch" )
2077
2063
. arg ( & arch)
2078
2064
. arg ( "-out" )
@@ -2083,9 +2069,6 @@ impl Step for Extended {
2083
2069
if rls_installer. is_some ( ) {
2084
2070
cmd. arg ( "-dRlsDir=rls" ) ;
2085
2071
}
2086
- if clippy_installer. is_some ( ) {
2087
- cmd. arg ( "-dClippyDir=clippy" ) ;
2088
- }
2089
2072
if miri_installer. is_some ( ) {
2090
2073
cmd. arg ( "-dMiriDir=miri" ) ;
2091
2074
}
@@ -2101,12 +2084,10 @@ impl Step for Extended {
2101
2084
candle ( "DocsGroup.wxs" . as_ref ( ) ) ;
2102
2085
candle ( "CargoGroup.wxs" . as_ref ( ) ) ;
2103
2086
candle ( "StdGroup.wxs" . as_ref ( ) ) ;
2087
+ candle ( "ClippyGroup.wxs" . as_ref ( ) ) ;
2104
2088
if rls_installer. is_some ( ) {
2105
2089
candle ( "RlsGroup.wxs" . as_ref ( ) ) ;
2106
2090
}
2107
- if clippy_installer. is_some ( ) {
2108
- candle ( "ClippyGroup.wxs" . as_ref ( ) ) ;
2109
- }
2110
2091
if miri_installer. is_some ( ) {
2111
2092
candle ( "MiriGroup.wxs" . as_ref ( ) ) ;
2112
2093
}
@@ -2138,14 +2119,12 @@ impl Step for Extended {
2138
2119
. arg ( "CargoGroup.wixobj" )
2139
2120
. arg ( "StdGroup.wixobj" )
2140
2121
. arg ( "AnalysisGroup.wixobj" )
2122
+ . arg ( "ClippyGroup.wixobj" )
2141
2123
. current_dir ( & exe) ;
2142
2124
2143
2125
if rls_installer. is_some ( ) {
2144
2126
cmd. arg ( "RlsGroup.wixobj" ) ;
2145
2127
}
2146
- if clippy_installer. is_some ( ) {
2147
- cmd. arg ( "ClippyGroup.wixobj" ) ;
2148
- }
2149
2128
if miri_installer. is_some ( ) {
2150
2129
cmd. arg ( "MiriGroup.wixobj" ) ;
2151
2130
}
0 commit comments