Skip to content
This repository was archived by the owner on Apr 5, 2024. It is now read-only.

Commit 8be7aca

Browse files
committed
Auto merge of #200 - JohnTitor:cargo-next, r=JohnTitor
Update `cargo` dependency to 0.54 The breaking change was introduced in rust-lang/cargo#9290.
2 parents 7a89ff2 + 6f7b10e commit 8be7aca

File tree

3 files changed

+37
-11
lines changed

3 files changed

+37
-11
lines changed

Cargo.lock

Lines changed: 25 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ license-file = "LICENSE"
1111
edition = "2018"
1212

1313
[dependencies]
14-
cargo = "0.53"
14+
cargo = "0.54"
1515
crates-io = "0.33" # Keep in sync with version pulled by Cargo
1616
curl = "0.4.38"
1717
env_logger = "0.8"

src/bin/cargo-semver.rs

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@
33

44
extern crate rustc_session;
55

6-
use cargo::core::{Package, PackageId, Source, SourceId, Workspace};
6+
use cargo::core::{FeatureValue, Package, PackageId, Source, SourceId, Workspace};
77
use cargo::sources::RegistrySource;
8+
use cargo::util::interning::InternedString;
89
use curl::easy::Easy;
910
use log::debug;
1011
use rustc_session::getopts;
@@ -15,6 +16,7 @@ use std::{
1516
io::Write,
1617
path::{Path, PathBuf},
1718
process::{Command, Stdio},
19+
rc::Rc,
1820
sync::{Arc, RwLock},
1921
};
2022

@@ -491,11 +493,16 @@ impl<'a> WorkInfo<'a> {
491493
};
492494

493495
if let Some(s) = matches.opt_str("features") {
494-
opts.features = s.split(' ').map(str::to_owned).collect();
496+
opts.cli_features.features = Rc::new(
497+
s.split(' ')
498+
.map(InternedString::new)
499+
.map(|f| FeatureValue::new(f))
500+
.collect(),
501+
);
495502
}
496503

497-
opts.all_features = matches.opt_present("all-features");
498-
opts.no_default_features = matches.opt_present("no-default-features");
504+
opts.cli_features.all_features = matches.opt_present("all-features");
505+
opts.cli_features.uses_default_features = !matches.opt_present("no-default-features");
499506

500507
env::set_var(
501508
"RUSTFLAGS",

0 commit comments

Comments
 (0)