Skip to content

Commit

Permalink
Suggest cargo install --locked on MSRV errors when installing
Browse files Browse the repository at this point in the history
  • Loading branch information
joshtriplett committed Jul 24, 2022
1 parent 931bb6c commit b10e9ab
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/cargo/ops/cargo_compile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -662,7 +662,11 @@ pub fn create_bcx<'a, 'cfg>(
}

let guidance = if ws.is_ephemeral() {
String::new()
if ws.ignore_lock() {
"Try re-running cargo install with `--locked`".to_string()
} else {
String::new()
}
} else {
format!(
"Either upgrade to rustc {} or newer, or use\n\
Expand Down

0 comments on commit b10e9ab

Please sign in to comment.