Skip to content
This repository has been archived by the owner on Dec 29, 2022. It is now read-only.

Update cargo. #1204

Merged
merged 1 commit into from
Dec 19, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 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 @@ categories = ["development-tools"]
build = "build.rs"

[dependencies]
cargo = { git = "https://github.com/rust-lang/cargo", rev = "5c3b8f2d9ccc4c6c890f073ccf97115779184cb4" }
cargo = { git = "https://github.com/rust-lang/cargo", rev = "2a9f16da7ffc4877aacf7547bac705f0d82de2d6" }
cargo_metadata = "0.6"
clippy_lints = { git = "https://github.com/rust-lang/rust-clippy", rev = "a3c77f6ad1c1c185e561e9cd7fdec7db569169d1", optional = true }
env_logger = "0.5"
Expand Down
7 changes: 4 additions & 3 deletions src/build/cargo_plan.rs
Original file line number Diff line number Diff line change
Expand Up @@ -212,20 +212,21 @@ impl CargoPlan {
.units
.iter()
.filter(|&(&(_, ref target, _), _)| {
*target.kind() == TargetKind::CustomBuild && target.src_path().is_path()
target.is_custom_build() && target.src_path().is_path()
})
.map(|(key, unit)| (unit.target.src_path().path(), key.clone()))
.map(|(key, unit)| (unit.target.src_path().path().unwrap(), key.clone()))
.collect();
let other_targets: HashMap<UnitKey, &Path> = self
.units
.iter()
.filter(|&(&(_, ref target, _), _)| *target.kind() != TargetKind::CustomBuild)
.filter(|&(&(_, ref target, _), _)| !target.is_custom_build())
.map(|(key, unit)| {
(
key.clone(),
unit.target
.src_path()
.path()
.expect("normal targets should have a path")
.parent()
.expect("no parent for src_path"),
)
Expand Down
10 changes: 9 additions & 1 deletion src/project_model.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,15 @@ impl ProjectModel {
.iter()
.find(|t| t.is_lib())
// racer expect name 'underscored'(crate) name
.map(|t| (t.src_path().path().to_owned(), t.name().replace('-', "_"))),
.map(|t| {
(
t.src_path()
.path()
.expect("lib must have a path")
.to_owned(),
t.name().replace('-', "_"),
)
}),
deps: Vec::new(),
edition: match cargo_pkg.manifest().edition() {
cargo::core::Edition::Edition2015 => racer::Edition::Ed2015,
Expand Down