Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 9e7ca80

Browse files
committed
Bump cargo_metadata
1 parent 2d3f0b4 commit 9e7ca80

File tree

5 files changed

+14
-9
lines changed

5 files changed

+14
-9
lines changed

Cargo.lock

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

crates/flycheck/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ doctest = false
1212
[dependencies]
1313
crossbeam-channel = "0.5.5"
1414
tracing = "0.1.35"
15-
cargo_metadata = "0.14.2"
15+
cargo_metadata = "0.15.0"
1616
serde = { version = "1.0.137", features = ["derive"] }
1717
serde_json = "1.0.81"
1818
jod-thread = "0.1.2"

crates/proc-macro-test/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ doctest = false
1212
[build-dependencies]
1313
proc-macro-test-impl = { path = "imp", version = "0.0.0" }
1414
toolchain = { path = "../toolchain", version = "0.0.0" }
15-
cargo_metadata = "0.14.2"
15+
cargo_metadata = "0.15.0"

crates/project-model/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ doctest = false
1212
[dependencies]
1313
tracing = "0.1.35"
1414
rustc-hash = "1.1.0"
15-
cargo_metadata = "0.14.2"
15+
cargo_metadata = "0.15.0"
1616
semver = "1.0.10"
1717
serde = { version = "1.0.137", features = ["derive"] }
1818
serde_json = "1.0.81"

crates/project-model/src/cargo_workspace.rs

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -318,10 +318,15 @@ impl CargoWorkspace {
318318
..
319319
} = meta_pkg;
320320
let meta = from_value::<PackageMetadata>(metadata.clone()).unwrap_or_default();
321-
let edition = edition.parse::<Edition>().unwrap_or_else(|err| {
322-
tracing::error!("Failed to parse edition {}", err);
323-
Edition::CURRENT
324-
});
321+
let edition = match edition {
322+
cargo_metadata::Edition::E2015 => Edition::Edition2015,
323+
cargo_metadata::Edition::E2018 => Edition::Edition2018,
324+
cargo_metadata::Edition::E2021 => Edition::Edition2021,
325+
_ => {
326+
tracing::error!("Unsupported edition `{:?}`", edition);
327+
Edition::CURRENT
328+
}
329+
};
325330
// We treat packages without source as "local" packages. That includes all members of
326331
// the current workspace, as well as any path dependency outside the workspace.
327332
let is_local = meta_pkg.source.is_none();

0 commit comments

Comments
 (0)