mirror of
https://github.com/rust-lang/cargo.git
synced 2025-10-01 11:30:39 +00:00
Only show advice to use cargo update --precise
for non-local packages
Packages in the local workspace can't get updated this way; the user just needs to point to a different source, or otherwise update the package themselves.
This commit is contained in:
parent
dcbb433340
commit
934e79072a
@ -667,7 +667,7 @@ pub fn create_bcx<'a, 'cfg>(
|
|||||||
} else {
|
} else {
|
||||||
String::new()
|
String::new()
|
||||||
}
|
}
|
||||||
} else {
|
} else if !unit.is_local() {
|
||||||
format!(
|
format!(
|
||||||
"Either upgrade to rustc {} or newer, or use\n\
|
"Either upgrade to rustc {} or newer, or use\n\
|
||||||
cargo update -p {}@{} --precise ver\n\
|
cargo update -p {}@{} --precise ver\n\
|
||||||
@ -678,6 +678,8 @@ pub fn create_bcx<'a, 'cfg>(
|
|||||||
unit.pkg.name(),
|
unit.pkg.name(),
|
||||||
current_version,
|
current_version,
|
||||||
)
|
)
|
||||||
|
} else {
|
||||||
|
String::new()
|
||||||
};
|
};
|
||||||
|
|
||||||
anyhow::bail!(
|
anyhow::bail!(
|
||||||
|
@ -124,10 +124,7 @@ fn rust_version_too_high() {
|
|||||||
.with_status(101)
|
.with_status(101)
|
||||||
.with_stderr(
|
.with_stderr(
|
||||||
"error: package `foo v0.0.1 ([..])` cannot be built because it requires \
|
"error: package `foo v0.0.1 ([..])` cannot be built because it requires \
|
||||||
rustc 1.9876.0 or newer, while the currently active rustc version is [..]\n\
|
rustc 1.9876.0 or newer, while the currently active rustc version is [..]\n\n",
|
||||||
Either upgrade to rustc 1.9876.0 or newer, or use\n\
|
|
||||||
cargo update -p foo@0.0.1 --precise ver\n\
|
|
||||||
where `ver` is the latest version of `foo` supporting rustc [..]",
|
|
||||||
)
|
)
|
||||||
.run();
|
.run();
|
||||||
p.cargo("build --ignore-rust-version").run();
|
p.cargo("build --ignore-rust-version").run();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user