Skip to content

Commit 3058f50

Browse files
committed
Make check_cfg_args fn not-fallible anymore
1 parent 4c38aee commit 3058f50

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/cargo/core/compiler/build_runner/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ impl<'a, 'gctx> BuildRunner<'a, 'gctx> {
246246
let mut args = compiler::extern_args(&self, unit, &mut unstable_opts)?;
247247
args.extend(compiler::lto_args(&self, unit));
248248
args.extend(compiler::features_args(unit));
249-
args.extend(compiler::check_cfg_args(unit)?);
249+
args.extend(compiler::check_cfg_args(unit));
250250

251251
let script_meta = self.find_build_script_metadata(unit);
252252
if let Some(meta) = script_meta {

src/cargo/core/compiler/mod.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)