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

Commit

Permalink
Auto merge of #200 - JohnTitor:cargo-next, r=JohnTitor
Browse files Browse the repository at this point in the history
Update `cargo` dependency to 0.54

The breaking change was introduced in rust-lang/cargo#9290.
  • Loading branch information
bors committed Jun 29, 2021
2 parents 7a89ff2 + 6f7b10e commit 8be7aca
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 11 deletions.
31 changes: 25 additions & 6 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ license-file = "LICENSE"
edition = "2018"

[dependencies]
cargo = "0.53"
cargo = "0.54"
crates-io = "0.33" # Keep in sync with version pulled by Cargo
curl = "0.4.38"
env_logger = "0.8"
Expand Down
15 changes: 11 additions & 4 deletions src/bin/cargo-semver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@

extern crate rustc_session;

use cargo::core::{Package, PackageId, Source, SourceId, Workspace};
use cargo::core::{FeatureValue, Package, PackageId, Source, SourceId, Workspace};
use cargo::sources::RegistrySource;
use cargo::util::interning::InternedString;
use curl::easy::Easy;
use log::debug;
use rustc_session::getopts;
Expand All @@ -15,6 +16,7 @@ use std::{
io::Write,
path::{Path, PathBuf},
process::{Command, Stdio},
rc::Rc,
sync::{Arc, RwLock},
};

Expand Down Expand Up @@ -491,11 +493,16 @@ impl<'a> WorkInfo<'a> {
};

if let Some(s) = matches.opt_str("features") {
opts.features = s.split(' ').map(str::to_owned).collect();
opts.cli_features.features = Rc::new(
s.split(' ')
.map(InternedString::new)
.map(|f| FeatureValue::new(f))
.collect(),
);
}

opts.all_features = matches.opt_present("all-features");
opts.no_default_features = matches.opt_present("no-default-features");
opts.cli_features.all_features = matches.opt_present("all-features");
opts.cli_features.uses_default_features = !matches.opt_present("no-default-features");

env::set_var(
"RUSTFLAGS",
Expand Down

0 comments on commit 8be7aca

Please sign in to comment.