@@ -80,7 +80,7 @@ pub trait Step: 'static + Clone + Debug + PartialEq + Eq + Hash {
80
80
// It is reasonable to not have an implementation of make_run for rules
81
81
// who do not want to get called from the root context. This means that
82
82
// they are likely dependencies (e.g., sysroot creation) or similar, and
83
- // as such calling them from ./x.py isn't logical.
83
+ // as such calling them from ` ./x.py` isn't logical.
84
84
unimplemented ! ( )
85
85
}
86
86
}
@@ -236,11 +236,11 @@ impl StepDescription {
236
236
#[ derive( Clone ) ]
237
237
pub struct ShouldRun < ' a > {
238
238
pub builder : & ' a Builder < ' a > ,
239
- // use a BTreeSet to maintain sort order
239
+ // Use a ` BTreeSet` to maintain sort order.
240
240
paths : BTreeSet < PathSet > ,
241
241
242
242
// If this is a default rule, this is an additional constraint placed on
243
- // its run. Generally something like compiler docs being enabled.
243
+ // its run (generally something like compiler docs being enabled) .
244
244
is_really_default : bool ,
245
245
}
246
246
@@ -249,7 +249,8 @@ impl<'a> ShouldRun<'a> {
249
249
ShouldRun {
250
250
builder,
251
251
paths : BTreeSet :: new ( ) ,
252
- is_really_default : true , // by default no additional conditions
252
+ // By default no additional conditions.
253
+ is_really_default : true ,
253
254
}
254
255
}
255
256
@@ -277,12 +278,12 @@ impl<'a> ShouldRun<'a> {
277
278
self
278
279
}
279
280
280
- // single , non-aliased path
281
+ // Single , non-aliased path.
281
282
pub fn path ( self , path : & str ) -> Self {
282
283
self . paths ( & [ path] )
283
284
}
284
285
285
- // multiple aliases for the same job
286
+ // Multiple aliases for the same job.
286
287
pub fn paths ( mut self , paths : & [ & str ] ) -> Self {
287
288
self . paths
288
289
. insert ( PathSet :: Set ( paths. iter ( ) . map ( PathBuf :: from) . collect ( ) ) ) ;
@@ -301,7 +302,7 @@ impl<'a> ShouldRun<'a> {
301
302
self
302
303
}
303
304
304
- // allows being more explicit about why should_run in Step returns the value passed to it
305
+ // Allows being more explicit about why `Step:: should_run` returns the value passed to it.
305
306
pub fn never ( mut self ) -> ShouldRun < ' a > {
306
307
self . paths . insert ( PathSet :: empty ( ) ) ;
307
308
self
@@ -677,7 +678,7 @@ impl<'a> Builder<'a> {
677
678
let compiler = self . compiler ( self . top_stage , host) ;
678
679
cmd. env ( "RUSTC_STAGE" , compiler. stage . to_string ( ) )
679
680
. env ( "RUSTC_SYSROOT" , self . sysroot ( compiler) )
680
- // Note that this is *not* the sysroot_libdir because rustdoc must be linked
681
+ // Note that this is *not* the ` sysroot_libdir` because rustdoc must be linked
681
682
// equivalently to rustc.
682
683
. env ( "RUSTDOC_LIBDIR" , self . rustc_libdir ( compiler) )
683
684
. env ( "CFG_RELEASE_CHANNEL" , & self . config . channel )
@@ -813,12 +814,12 @@ impl<'a> Builder<'a> {
813
814
}
814
815
815
816
cargo. arg ( "-j" ) . arg ( self . jobs ( ) . to_string ( ) ) ;
816
- // Remove make-related flags to ensure Cargo can correctly set things up
817
+ // Remove make-related flags to ensure Cargo can correctly set things up.
817
818
cargo. env_remove ( "MAKEFLAGS" ) ;
818
819
cargo. env_remove ( "MFLAGS" ) ;
819
820
820
- // FIXME: Temporary fix for https://github.com/ rust-lang/cargo/issues/ 3005
821
- // Force cargo to output binaries with disambiguating hashes in the name
821
+ // FIXME: temporary fix for rust-lang/cargo# 3005.
822
+ // Force cargo to output binaries with disambiguating hashes in the name.
822
823
let metadata = if compiler. stage == 0 {
823
824
// Treat stage0 like special channel, whether it's a normal prior-
824
825
// release rustc or a local rebuild with the same version, so we
@@ -863,7 +864,7 @@ impl<'a> Builder<'a> {
863
864
// "raw" compiler in that it's the exact snapshot we download. Normally
864
865
// the stage0 build means it uses libraries build by the stage0
865
866
// compiler, but for tools we just use the precompiled libraries that
866
- // we've downloaded
867
+ // we've downloaded.
867
868
let use_snapshot = mode == Mode :: ToolBootstrap ;
868
869
assert ! ( !use_snapshot || stage == 0 || self . local_rebuild) ;
869
870
@@ -920,7 +921,7 @@ impl<'a> Builder<'a> {
920
921
921
922
if mode. is_tool ( ) {
922
923
// Tools like cargo and rls don't get debuginfo by default right now, but this can be
923
- // enabled in the config. Adding debuginfo makes them several times larger.
924
+ // enabled in the config. Adding debuginfo makes them several times larger.
924
925
if self . config . rust_debuginfo_tools {
925
926
cargo. env ( "RUSTC_DEBUGINFO" , self . config . rust_debuginfo . to_string ( ) ) ;
926
927
cargo. env (
@@ -1028,7 +1029,7 @@ impl<'a> Builder<'a> {
1028
1029
// Build scripts use either the `cc` crate or `configure/make` so we pass
1029
1030
// the options through environment variables that are fetched and understood by both.
1030
1031
//
1031
- // FIXME: the guard against msvc shouldn't need to be here
1032
+ // FIXME: the guard against MSVC shouldn't need to be here.
1032
1033
if target. contains ( "msvc" ) {
1033
1034
if let Some ( ref cl) = self . config . llvm_clang_cl {
1034
1035
cargo. env ( "CC" , cl) . env ( "CXX" , cl) ;
@@ -1040,7 +1041,7 @@ impl<'a> Builder<'a> {
1040
1041
Some ( ref s) => s,
1041
1042
None => return s. display ( ) . to_string ( ) ,
1042
1043
} ;
1043
- // FIXME: the cc-rs crate only recognizes the literal strings
1044
+ // FIXME: the cc-rs crate only recognizes the literal strings.
1044
1045
// `ccache` and `sccache` when doing caching compilations, so we
1045
1046
// mirror that here. It should probably be fixed upstream to
1046
1047
// accept a new env var or otherwise work with custom ccache
@@ -1080,12 +1081,12 @@ impl<'a> Builder<'a> {
1080
1081
cargo. env ( "RUSTC_SAVE_ANALYSIS" , "api" . to_string ( ) ) ;
1081
1082
}
1082
1083
1083
- // For `cargo doc` invocations, make rustdoc print the Rust version into the docs
1084
+ // For `cargo doc` invocations, make rustdoc print the Rust version into the docs.
1084
1085
cargo. env ( "RUSTDOC_CRATE_VERSION" , self . rust_version ( ) ) ;
1085
1086
1086
- // Environment variables *required* throughout the build
1087
+ // Environment variables *required* throughout the build.
1087
1088
//
1088
- // FIXME: should update code to not require this env var
1089
+ // FIXME: should update code to not require this env var.
1089
1090
cargo. env ( "CFG_COMPILER_HOST_TRIPLE" , target) ;
1090
1091
1091
1092
// Set this for all builds to make sure doc builds also get it.
@@ -1476,7 +1477,7 @@ mod __test {
1476
1477
#[ test]
1477
1478
fn dist_with_target_flag ( ) {
1478
1479
let mut config = configure ( & [ "B" ] , & [ "C" ] ) ;
1479
- config. run_host_only = false ; // as- if --target=C was passed
1480
+ config. run_host_only = false ; // as if ` --target=C` were passed
1480
1481
let build = Build :: new ( config) ;
1481
1482
let mut builder = Builder :: new ( & build) ;
1482
1483
builder. run_step_descriptions ( & Builder :: get_step_descriptions ( Kind :: Dist ) , & [ ] ) ;
0 commit comments