Skip to content

Commit 2e44a65

Browse files
committed
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.
1 parent 0b002e4 commit 2e44a65

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/cargo/ops/cargo_compile.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -667,7 +667,7 @@ pub fn create_bcx<'a, 'cfg>(
667667
} else {
668668
String::new()
669669
}
670-
} else {
670+
} else if !ws.is_local() {
671671
format!(
672672
"Either upgrade to rustc {} or newer, or use\n\
673673
cargo update -p {}@{} --precise ver\n\
@@ -678,6 +678,8 @@ pub fn create_bcx<'a, 'cfg>(
678678
unit.pkg.name(),
679679
current_version,
680680
)
681+
} else {
682+
String::new()
681683
};
682684

683685
anyhow::bail!(

0 commit comments

Comments
 (0)