Skip to content

Commit

Permalink
Auto merge of #4579 - mdevlamynck:issue-3388, r=alexcrichton
Browse files Browse the repository at this point in the history
Fix error message when Cargo.toml misses a [package] section

Fixes #3388.
  • Loading branch information
bors committed Oct 4, 2017
2 parents f0b06ca + 4cd544c commit 0826f27
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/cargo/util/toml/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,7 @@ impl TomlManifest {

let project = me.project.as_ref().or_else(|| me.package.as_ref());
let project = project.ok_or_else(|| {
CargoError::from("no `package` or `project` section found.")
CargoError::from("no `package` section found.")
})?;

let package_name = project.name.trim();
Expand Down
2 changes: 1 addition & 1 deletion tests/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ fn cargo_compile_with_invalid_manifest() {
[ERROR] failed to parse manifest at `[..]`
Caused by:
no `package` or `project` section found.
no `package` section found.
"))
}

Expand Down
1 change: 0 additions & 1 deletion tests/jobserver.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
extern crate cargotest;
extern crate hamcrest;

use std::str;
use std::net::TcpListener;
use std::thread;
use std::process::Command;
Expand Down
2 changes: 1 addition & 1 deletion tests/metadata.rs
Original file line number Diff line number Diff line change
Expand Up @@ -547,7 +547,7 @@ fn cargo_metadata_with_invalid_manifest() {
[ERROR] failed to parse manifest at `[..]`
Caused by:
no `package` or `project` section found."))
no `package` section found."))
}

const MANIFEST_OUTPUT: &'static str=
Expand Down

0 comments on commit 0826f27

Please sign in to comment.