File tree Expand file tree Collapse file tree 2 files changed +13
-2
lines changed Expand file tree Collapse file tree 2 files changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -362,12 +362,23 @@ pub(super) fn activation_error(
362362 let _ = writeln ! ( & mut msg, " version {} is not cached" , summary. version( ) ) ;
363363 }
364364 IndexSummary :: Unsupported ( summary, schema_version) => {
365- let _ = writeln ! (
365+ if let Some ( rust_version) = summary. rust_version ( ) {
366+ // HACK: technically its unsupported and we shouldn't make assumptions
367+ // about the entry but this is limited and for diagnostics purposes
368+ let _ = writeln ! (
369+ & mut msg,
370+ " version {} requires cargo {}" ,
371+ summary. version( ) ,
372+ rust_version
373+ ) ;
374+ } else {
375+ let _ = writeln ! (
366376 & mut msg,
367377 " version {} requires a Cargo version that supports index version {}" ,
368378 summary. version( ) ,
369379 schema_version
370380 ) ;
381+ }
371382 }
372383 }
373384 }
Original file line number Diff line number Diff line change @@ -3267,7 +3267,7 @@ fn unknown_index_version_with_msrv_error() {
32673267 . with_stderr_data ( str![ [ r#"
32683268[UPDATING] `dummy-registry` index
32693269[ERROR] no matching versions for `bar` found
3270- version 1.0.1 requires a Cargo version that supports index version 4294967295
3270+ version 1.0.1 requires cargo 1.2345
32713271location searched: `dummy-registry` index (which is replacing registry `crates-io`)
32723272required by package `foo v0.1.0 ([ROOT]/foo)`
32733273
You can’t perform that action at this time.
0 commit comments