Skip to content

Commit

Permalink
Auto merge of #5283 - matklad:better-assertion, r=matklad
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
bors committed Apr 3, 2018
2 parents e06b964 + dfdb9aa commit 18ec7db
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion src/cargo/core/manifest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,11 @@ impl VirtualManifest {

impl Target {
fn with_path(src_path: PathBuf) -> Target {
assert!(src_path.is_absolute());
assert!(
src_path.is_absolute(),
"`{}` is not absolute",
src_path.display()
);
Target {
kind: TargetKind::Bin,
name: String::new(),
Expand Down
2 changes: 1 addition & 1 deletion src/cargo/util/toml/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ use url::Url;

use core::{GitReference, PackageIdSpec, Profiles, SourceId, WorkspaceConfig, WorkspaceRootConfig};
use core::{Dependency, Manifest, PackageId, Summary, Target};
use core::{EitherManifest, Edition, Feature, Features, VirtualManifest};
use core::{Edition, EitherManifest, Feature, Features, VirtualManifest};
use core::dependency::{Kind, Platform};
use core::manifest::{LibKind, Lto, ManifestMetadata, Profile};
use sources::CRATES_IO;
Expand Down

0 comments on commit 18ec7db

Please sign in to comment.