diff --git a/Cargo.lock b/Cargo.lock index 6e3063c1ead..b90173b098e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -86,13 +86,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "cargo" version = "0.34.0" -source = "git+https://github.com/rust-lang/cargo?rev=5c3b8f2d9ccc4c6c890f073ccf97115779184cb4#5c3b8f2d9ccc4c6c890f073ccf97115779184cb4" +source = "git+https://github.com/rust-lang/cargo?rev=2a9f16da7ffc4877aacf7547bac705f0d82de2d6#2a9f16da7ffc4877aacf7547bac705f0d82de2d6" dependencies = [ "atty 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", "bytesize 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "clap 2.32.0 (registry+https://github.com/rust-lang/crates.io-index)", "core-foundation 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)", - "crates-io 0.22.0 (git+https://github.com/rust-lang/cargo?rev=5c3b8f2d9ccc4c6c890f073ccf97115779184cb4)", + "crates-io 0.22.0 (git+https://github.com/rust-lang/cargo?rev=2a9f16da7ffc4877aacf7547bac705f0d82de2d6)", "crossbeam-utils 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "crypto-hash 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "curl 0.4.19 (registry+https://github.com/rust-lang/crates.io-index)", @@ -235,7 +235,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "crates-io" version = "0.22.0" -source = "git+https://github.com/rust-lang/cargo?rev=5c3b8f2d9ccc4c6c890f073ccf97115779184cb4#5c3b8f2d9ccc4c6c890f073ccf97115779184cb4" +source = "git+https://github.com/rust-lang/cargo?rev=2a9f16da7ffc4877aacf7547bac705f0d82de2d6#2a9f16da7ffc4877aacf7547bac705f0d82de2d6" dependencies = [ "curl 0.4.19 (registry+https://github.com/rust-lang/crates.io-index)", "failure 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1136,7 +1136,7 @@ dependencies = [ name = "rls" version = "1.31.6" dependencies = [ - "cargo 0.34.0 (git+https://github.com/rust-lang/cargo?rev=5c3b8f2d9ccc4c6c890f073ccf97115779184cb4)", + "cargo 0.34.0 (git+https://github.com/rust-lang/cargo?rev=2a9f16da7ffc4877aacf7547bac705f0d82de2d6)", "cargo_metadata 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", "clippy_lints 0.0.212 (git+https://github.com/rust-lang/rust-clippy?rev=a3c77f6ad1c1c185e561e9cd7fdec7db569169d1)", "crossbeam-channel 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1801,7 +1801,7 @@ dependencies = [ "checksum bytecount 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b92204551573580e078dc80017f36a213eb77a0450e4ddd8cfa0f3f2d1f0178f" "checksum byteorder 1.2.7 (registry+https://github.com/rust-lang/crates.io-index)" = "94f88df23a25417badc922ab0f5716cc1330e87f71ddd9203b3a3ccd9cedf75d" "checksum bytesize 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "716960a18f978640f25101b5cbf1c6f6b0d3192fab36a2d98ca96f0ecbe41010" -"checksum cargo 0.34.0 (git+https://github.com/rust-lang/cargo?rev=5c3b8f2d9ccc4c6c890f073ccf97115779184cb4)" = "" +"checksum cargo 0.34.0 (git+https://github.com/rust-lang/cargo?rev=2a9f16da7ffc4877aacf7547bac705f0d82de2d6)" = "" "checksum cargo_metadata 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7d8dfe3adeb30f7938e6c1dd5327f29235d8ada3e898aeb08c343005ec2915a2" "checksum cc 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)" = "f159dfd43363c4d08055a07703eb7a3406b0dac4d0584d96965a3262db3c9d16" "checksum cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "082bb9b28e00d3c9d39cc03e64ce4cea0f1bb9b3fde493f0cbc008472d22bdf4" @@ -1812,7 +1812,7 @@ dependencies = [ "checksum commoncrypto-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1fed34f46747aa73dfaa578069fd8279d2818ade2b55f38f22a9401c7f4083e2" "checksum core-foundation 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)" = "4e2640d6d0bf22e82bed1b73c6aef8d5dd31e5abe6666c57e6d45e2649f4f887" "checksum core-foundation-sys 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e7ca8a5221364ef15ce201e8ed2f609fc312682a8f4e0e3d4aa5879764e0fa3b" -"checksum crates-io 0.22.0 (git+https://github.com/rust-lang/cargo?rev=5c3b8f2d9ccc4c6c890f073ccf97115779184cb4)" = "" +"checksum crates-io 0.22.0 (git+https://github.com/rust-lang/cargo?rev=2a9f16da7ffc4877aacf7547bac705f0d82de2d6)" = "" "checksum crc 1.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d663548de7f5cca343f1e0a48d14dcfb0e9eb4e079ec58883b7251539fa10aeb" "checksum crossbeam-channel 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "7b85741761b7f160bc5e7e0c14986ef685b7f8bf9b7ad081c60c604bb4649827" "checksum crossbeam-deque 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f739f8c5363aca78cfb059edf753d8f0d36908c348f3d8d1503f03d8b75d9cf3" diff --git a/Cargo.toml b/Cargo.toml index 83069e89446..01a62f891c0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -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" diff --git a/src/build/cargo_plan.rs b/src/build/cargo_plan.rs index 0ac2599ef55..d30df3f79c3 100644 --- a/src/build/cargo_plan.rs +++ b/src/build/cargo_plan.rs @@ -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 = 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"), ) diff --git a/src/project_model.rs b/src/project_model.rs index f787daeedc9..cc6fae27fc2 100644 --- a/src/project_model.rs +++ b/src/project_model.rs @@ -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,