mirror of
https://github.com/rust-lang/cargo
synced 2024-10-13 19:22:33 +00:00
cargo fetch
: Display workspace warnings.
This commit is contained in:
parent
6aca041592
commit
22619a29e3
|
@ -16,6 +16,7 @@ pub fn fetch<'a>(
|
|||
ws: &Workspace<'a>,
|
||||
options: &FetchOptions<'a>,
|
||||
) -> CargoResult<(Resolve, PackageSet<'a>)> {
|
||||
ws.emit_warnings()?;
|
||||
let (packages, resolve) = ops::resolve_ws(ws)?;
|
||||
|
||||
let jobs = Some(1);
|
||||
|
|
|
@ -112,3 +112,22 @@ fn fetch_platform_specific_dependencies() {
|
|||
.with_stderr_does_not_contain("[DOWNLOADED] d1 v1.2.3 [..]")
|
||||
.run();
|
||||
}
|
||||
|
||||
#[cargo_test]
|
||||
fn fetch_warning() {
|
||||
let p = project()
|
||||
.file(
|
||||
"Cargo.toml",
|
||||
r#"
|
||||
[package]
|
||||
name = "foo"
|
||||
version = "1.0.0"
|
||||
misspelled = "wut"
|
||||
"#,
|
||||
)
|
||||
.file("src/lib.rs", "")
|
||||
.build();
|
||||
p.cargo("fetch")
|
||||
.with_stderr("[WARNING] unused manifest key: package.misspelled")
|
||||
.run();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue