File tree 2 files changed +10
-15
lines changed 2 files changed +10
-15
lines changed Original file line number Diff line number Diff line change @@ -76,12 +76,6 @@ impl OptVersionReq {
76
76
}
77
77
78
78
pub fn update_precise ( & mut self , version : & Version ) {
79
- assert ! (
80
- self . matches( version) ,
81
- "cannot update_precise {} to {}" ,
82
- self ,
83
- version
84
- ) ;
85
79
use OptVersionReq :: * ;
86
80
let version = version. clone ( ) ;
87
81
* self = match self {
Original file line number Diff line number Diff line change @@ -417,13 +417,14 @@ fn update_precise_mismatched() {
417
417
418
418
// `1.6.0` does not match `"~1.2"`
419
419
p. cargo ( "update serde:1.2 --precise 1.6.0" )
420
- // This terrible error message was a regression in #12749
421
420
. with_stderr (
422
421
"\
423
422
[UPDATING] `[..]` index
424
- thread 'main' panicked at src/cargo/util/semver_ext.rs:79:9:
425
- cannot update_precise ~1.2 to 1.6.0
426
- [..]
423
+ [ERROR] failed to select a version for the requirement `serde = \" ~1.2\" `
424
+ candidate versions found which didn't match: 1.6.0
425
+ location searched: `[..]` index (which is replacing registry `crates-io`)
426
+ required by package `bar v0.0.1 ([..]/foo)`
427
+ perhaps a crate was updated and forgotten to be re-vendored?
427
428
" ,
428
429
)
429
430
. with_status ( 101 )
@@ -434,11 +435,11 @@ cannot update_precise ~1.2 to 1.6.0
434
435
// This terrible error message has been the same for a long time. A fix is more than welcome!
435
436
. with_stderr (
436
437
"\
437
- [UPDATING] `[..]` index
438
- [ERROR] no matching package named `serde` found
439
- location searched: registry `crates-io`
440
- required by package `bar v0.0.1 ([..]/foo)`
441
- ",
438
+ [UPDATING] `[..]` index
439
+ [ERROR] no matching package named `serde` found
440
+ location searched: registry `crates-io`
441
+ required by package `bar v0.0.1 ([..]/foo)`
442
+ " ,
442
443
)
443
444
. with_status ( 101 )
444
445
. run ( ) ;
You can’t perform that action at this time.
0 commit comments