@@ -139,11 +139,17 @@ macro_rules! install {
139
139
140
140
install ! ( ( self , builder, _config) ,
141
141
Docs , "src/doc" , _config. docs, only_hosts: false , {
142
- let tarball = builder. ensure( dist:: Docs { host: self . target } ) . expect( "missing docs" ) ;
143
- install_sh( builder, "docs" , self . compiler. stage, Some ( self . target) , & tarball) ;
142
+ if let Some ( tarball) = builder. ensure( dist:: Docs { host: self . target } ) {
143
+ install_sh( builder, "docs" , self . compiler. stage, Some ( self . target) , & tarball) ;
144
+ } else {
145
+ panic!( "docs are not available to install, \
146
+ check that `build.docs` is true in `config.toml`") ;
147
+ }
144
148
} ;
145
149
Std , "library/std" , true , only_hosts: false , {
146
150
for target in & builder. targets {
151
+ // `expect` should be safe, only None when host != build, but this
152
+ // only runs when host == build
147
153
let tarball = builder. ensure( dist:: Std {
148
154
compiler: self . compiler,
149
155
target: * target
@@ -165,10 +171,15 @@ install!((self, builder, _config),
165
171
}
166
172
} ;
167
173
RustAnalyzer , "rust-analyzer" , Self :: should_build( _config) , only_hosts: true , {
168
- let tarball = builder
169
- . ensure( dist:: RustAnalyzer { compiler: self . compiler, target: self . target } )
170
- . expect( "missing rust-analyzer" ) ;
171
- install_sh( builder, "rust-analyzer" , self . compiler. stage, Some ( self . target) , & tarball) ;
174
+ if let Some ( tarball) =
175
+ builder. ensure( dist:: RustAnalyzer { compiler: self . compiler, target: self . target } )
176
+ {
177
+ install_sh( builder, "rust-analyzer" , self . compiler. stage, Some ( self . target) , & tarball) ;
178
+ } else {
179
+ builder. info(
180
+ & format!( "skipping Install rust-analyzer stage{} ({})" , self . compiler. stage, self . target) ,
181
+ ) ;
182
+ }
172
183
} ;
173
184
Clippy , "clippy" , Self :: should_build( _config) , only_hosts: true , {
174
185
let tarball = builder. ensure( dist:: Clippy { compiler: self . compiler, target: self . target } ) ;
@@ -212,6 +223,8 @@ install!((self, builder, _config),
212
223
}
213
224
} ;
214
225
Analysis , "analysis" , Self :: should_build( _config) , only_hosts: false , {
226
+ // `expect` should be safe, only None with host != build, but this
227
+ // only uses the `build` compiler
215
228
let tarball = builder. ensure( dist:: Analysis {
216
229
// Find the actual compiler (handling the full bootstrap option) which
217
230
// produced the save-analysis data because that data isn't copied
0 commit comments