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

Commit f3c253e

Browse files
authored
Merge pull request #1767 from weihanglo/cargo-d6cdde584
Bump cargo version
2 parents 131168b + 09049fd commit f3c253e

File tree

3 files changed

+20
-16
lines changed

3 files changed

+20
-16
lines changed

Cargo.lock

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

Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ rls-vfs = "0.8"
3131
rls-ipc = { version = "0.1.0", path = "rls-ipc", optional = true }
3232

3333
anyhow = "1.0.26"
34-
cargo = { git = "https://github.com/rust-lang/cargo", rev = "1c034752de0df744fcd7788fcbca158830b8bf85" }
35-
cargo-util = { git = "https://github.com/rust-lang/cargo", rev = "1c034752de0df744fcd7788fcbca158830b8bf85" }
34+
cargo = { git = "https://github.com/rust-lang/cargo", rev = "d6cdde584a1f15ea086bae922e20fd27f7165431" }
35+
cargo-util = { git = "https://github.com/rust-lang/cargo", rev = "d6cdde584a1f15ea086bae922e20fd27f7165431" }
3636
cargo_metadata = "0.14"
3737
clippy_lints = { git = "https://github.com/rust-lang/rust-clippy", version = "0.1.60", optional = true }
3838
env_logger = "0.9"
@@ -58,7 +58,7 @@ regex = "1"
5858
ordslice = "0.3"
5959
crossbeam-channel = "0.5"
6060
toml = "0.5"
61-
toml_edit = { version = "0.13.1", features = ["easy"] }
61+
toml_edit = { version = "0.13.4", features = ["easy"] }
6262
heck = "0.3"
6363

6464
# A noop dependency that changes in the Rust repository, it's a bit of a hack.

rls/src/project_model.rs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,10 @@ use cargo::{
77
PackageId, Workspace,
88
},
99
ops,
10-
util::{errors::CargoResult, important_paths::find_root_manifest_for_wd, toml},
10+
util::{
11+
errors::CargoResult, important_paths::find_root_manifest_for_wd, interning::InternedString,
12+
toml,
13+
},
1114
Config,
1215
};
1316
use log::warn;
@@ -36,7 +39,7 @@ struct PackageData {
3639

3740
#[derive(Debug)]
3841
pub struct Dep {
39-
pub crate_name: String,
42+
pub crate_name: InternedString,
4043
pub pkg: Package,
4144
}
4245

@@ -103,7 +106,8 @@ impl ProjectModel {
103106
let pkg = cargo_packages.get_one(dep_id)?;
104107
let lib = pkg.targets().iter().find(|t| t.is_lib());
105108
if let Some(lib) = lib {
106-
let crate_name = resolve.extern_crate_name(pkg_id, dep_id, &lib)?;
109+
let (crate_name, _) =
110+
resolve.extern_crate_name_and_dep_name(pkg_id, dep_id, &lib)?;
107111
packages[pkg_id_to_pkg[&pkg_id].0]
108112
.deps
109113
.push(Dep { crate_name, pkg: pkg_id_to_pkg[&dep_id] })

0 commit comments

Comments
 (0)