@@ -743,7 +743,7 @@ fn prepare_rustdoc(build_runner: &BuildRunner<'_, '_>, unit: &Unit) -> CargoResu
743743 let doc_dir = build_runner. files ( ) . out_dir ( unit) ;
744744 rustdoc. arg ( "-o" ) . arg ( & doc_dir) ;
745745 rustdoc. args ( & features_args ( unit) ) ;
746- rustdoc. args ( & check_cfg_args ( unit) ? ) ;
746+ rustdoc. args ( & check_cfg_args ( unit) ) ;
747747
748748 add_error_format_and_color ( build_runner, & mut rustdoc) ;
749749 add_allow_features ( build_runner, & mut rustdoc) ;
@@ -1140,7 +1140,7 @@ fn build_base_args(
11401140 }
11411141
11421142 cmd. args ( & features_args ( unit) ) ;
1143- cmd. args ( & check_cfg_args ( unit) ? ) ;
1143+ cmd. args ( & check_cfg_args ( unit) ) ;
11441144
11451145 let meta = build_runner. files ( ) . metadata ( unit) ;
11461146 cmd. arg ( "-C" ) . arg ( & format ! ( "metadata={}" , meta) ) ;
@@ -1354,7 +1354,7 @@ fn package_remap(build_runner: &BuildRunner<'_, '_>, unit: &Unit) -> OsString {
13541354}
13551355
13561356/// 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 > {
13581358 // The routine below generates the --check-cfg arguments. Our goals here are to
13591359 // enable the checking of conditionals and pass the list of declared features.
13601360 //
@@ -1391,12 +1391,12 @@ fn check_cfg_args(unit: &Unit) -> CargoResult<Vec<OsString>> {
13911391 // Cargo and docs.rs than rustc and docs.rs. In particular, all users of docs.rs use
13921392 // Cargo, but not all users of rustc (like Rust-for-Linux) use docs.rs.
13931393
1394- Ok ( vec ! [
1394+ vec ! [
13951395 OsString :: from( "--check-cfg" ) ,
13961396 OsString :: from( "cfg(docsrs)" ) ,
13971397 OsString :: from( "--check-cfg" ) ,
13981398 arg_feature,
1399- ] )
1399+ ]
14001400}
14011401
14021402/// Adds LTO related codegen flags.
0 commit comments