Skip to content

Commit 18ec7db

Browse files
committed
Auto merge of #5283 - matklad:better-assertion, r=matklad
Make assertion more informative This assertion triggers when I try to build Cargo simultaneosly on linux host and windows VM via a shared folder, but it's not clear what is going on.
2 parents e06b964 + dfdb9aa commit 18ec7db

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/cargo/core/manifest.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -445,7 +445,11 @@ impl VirtualManifest {
445445

446446
impl Target {
447447
fn with_path(src_path: PathBuf) -> Target {
448-
assert!(src_path.is_absolute());
448+
assert!(
449+
src_path.is_absolute(),
450+
"`{}` is not absolute",
451+
src_path.display()
452+
);
449453
Target {
450454
kind: TargetKind::Bin,
451455
name: String::new(),

src/cargo/util/toml/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ use url::Url;
1414

1515
use core::{GitReference, PackageIdSpec, Profiles, SourceId, WorkspaceConfig, WorkspaceRootConfig};
1616
use core::{Dependency, Manifest, PackageId, Summary, Target};
17-
use core::{EitherManifest, Edition, Feature, Features, VirtualManifest};
17+
use core::{Edition, EitherManifest, Feature, Features, VirtualManifest};
1818
use core::dependency::{Kind, Platform};
1919
use core::manifest::{LibKind, Lto, ManifestMetadata, Profile};
2020
use sources::CRATES_IO;

0 commit comments

Comments
 (0)