@@ -743,7 +743,7 @@ fn prepare_rustdoc(build_runner: &BuildRunner<'_, '_>, unit: &Unit) -> CargoResu
743
743
let doc_dir = build_runner. files ( ) . out_dir ( unit) ;
744
744
rustdoc. arg ( "-o" ) . arg ( & doc_dir) ;
745
745
rustdoc. args ( & features_args ( unit) ) ;
746
- rustdoc. args ( & check_cfg_args ( unit) ? ) ;
746
+ rustdoc. args ( & check_cfg_args ( unit) ) ;
747
747
748
748
add_error_format_and_color ( build_runner, & mut rustdoc) ;
749
749
add_allow_features ( build_runner, & mut rustdoc) ;
@@ -1140,7 +1140,7 @@ fn build_base_args(
1140
1140
}
1141
1141
1142
1142
cmd. args ( & features_args ( unit) ) ;
1143
- cmd. args ( & check_cfg_args ( unit) ? ) ;
1143
+ cmd. args ( & check_cfg_args ( unit) ) ;
1144
1144
1145
1145
let meta = build_runner. files ( ) . metadata ( unit) ;
1146
1146
cmd. arg ( "-C" ) . arg ( & format ! ( "metadata={}" , meta) ) ;
@@ -1354,7 +1354,7 @@ fn package_remap(build_runner: &BuildRunner<'_, '_>, unit: &Unit) -> OsString {
1354
1354
}
1355
1355
1356
1356
/// Generates the `--check-cfg` arguments for the `unit`.
1357
- fn check_cfg_args ( unit : & Unit ) -> CargoResult < Vec < OsString > > {
1357
+ fn check_cfg_args ( unit : & Unit ) -> Vec < OsString > {
1358
1358
// The routine below generates the --check-cfg arguments. Our goals here are to
1359
1359
// enable the checking of conditionals and pass the list of declared features.
1360
1360
//
@@ -1391,12 +1391,12 @@ fn check_cfg_args(unit: &Unit) -> CargoResult<Vec<OsString>> {
1391
1391
// Cargo and docs.rs than rustc and docs.rs. In particular, all users of docs.rs use
1392
1392
// Cargo, but not all users of rustc (like Rust-for-Linux) use docs.rs.
1393
1393
1394
- Ok ( vec ! [
1394
+ vec ! [
1395
1395
OsString :: from( "--check-cfg" ) ,
1396
1396
OsString :: from( "cfg(docsrs)" ) ,
1397
1397
OsString :: from( "--check-cfg" ) ,
1398
1398
arg_feature,
1399
- ] )
1399
+ ]
1400
1400
}
1401
1401
1402
1402
/// Adds LTO related codegen flags.
0 commit comments