File tree 1 file changed +7
-3
lines changed
1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -1270,7 +1270,11 @@ impl<'a> Builder<'a> {
1270
1270
}
1271
1271
1272
1272
// For `cargo doc` invocations, make rustdoc print the Rust version into the docs
1273
- rustdocflags. arg ( "--crate-version" ) . arg ( & self . rust_version ( ) ) ;
1273
+ // This replaces spaces with newlines because RUSTDOCFLAGS does not
1274
+ // support arguments with regular spaces. Hopefully someday Cargo will
1275
+ // have space support.
1276
+ let rust_version = self . rust_version ( ) . replace ( ' ' , "\n " ) ;
1277
+ rustdocflags. arg ( "--crate-version" ) . arg ( & rust_version) ;
1274
1278
1275
1279
// Environment variables *required* throughout the build
1276
1280
//
@@ -1447,14 +1451,14 @@ impl Rustflags {
1447
1451
1448
1452
fn env ( & mut self , env : & str ) {
1449
1453
if let Ok ( s) = env:: var ( env) {
1450
- for part in s. split_whitespace ( ) {
1454
+ for part in s. split ( ' ' ) {
1451
1455
self . arg ( part) ;
1452
1456
}
1453
1457
}
1454
1458
}
1455
1459
1456
1460
fn arg ( & mut self , arg : & str ) -> & mut Self {
1457
- assert_eq ! ( arg. split_whitespace ( ) . count( ) , 1 ) ;
1461
+ assert_eq ! ( arg. split ( ' ' ) . count( ) , 1 ) ;
1458
1462
if !self . 0 . is_empty ( ) {
1459
1463
self . 0 . push_str ( " " ) ;
1460
1464
}
You can’t perform that action at this time.
0 commit comments