File tree 2 files changed +13
-2
lines changed
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(
362
362
let _ = writeln ! ( & mut msg, " version {} is not cached" , summary. version( ) ) ;
363
363
}
364
364
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 ! (
366
376
& mut msg,
367
377
" version {} requires a Cargo version that supports index version {}" ,
368
378
summary. version( ) ,
369
379
schema_version
370
380
) ;
381
+ }
371
382
}
372
383
}
373
384
}
Original file line number Diff line number Diff line change @@ -3267,7 +3267,7 @@ fn unknown_index_version_with_msrv_error() {
3267
3267
. with_stderr_data ( str![ [ r#"
3268
3268
[UPDATING] `dummy-registry` index
3269
3269
[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
3271
3271
location searched: `dummy-registry` index (which is replacing registry `crates-io`)
3272
3272
required by package `foo v0.1.0 ([ROOT]/foo)`
3273
3273
You can’t perform that action at this time.
0 commit comments