File tree 2 files changed +52
-1
lines changed
2 files changed +52
-1
lines changed Original file line number Diff line number Diff line change @@ -116,7 +116,7 @@ enum Kind {
116
116
/// directive that we found in a lockfile, if present.
117
117
pub struct LockedPatchDependency {
118
118
/// The original `Dependency` directive, except "locked" so it's version
119
- /// requirement is `= foo` and its `SourceId` has a "precise" listed.
119
+ /// requirement is Locked to ` foo` and its `SourceId` has a "precise" listed.
120
120
pub dependency : Dependency ,
121
121
/// The `PackageId` that was previously found in a lock file which
122
122
/// `dependency` matches.
Original file line number Diff line number Diff line change @@ -3597,6 +3597,57 @@ fn differ_only_by_metadata() {
3597
3597
[CHECKING] baz v0.0.1+b
3598
3598
[CHECKING] foo v0.0.1 ([CWD])
3599
3599
[FINISHED] dev [unoptimized + debuginfo] target(s) in [..]s
3600
+ " ,
3601
+ )
3602
+ . run ( ) ;
3603
+
3604
+ Package :: new ( "baz" , "0.0.1+d" ) . publish ( ) ;
3605
+
3606
+ p. cargo ( "clean" ) . run ( ) ;
3607
+ p. cargo ( "check" )
3608
+ . with_stderr_contains ( "[CHECKING] baz v0.0.1+b" )
3609
+ . run ( ) ;
3610
+ }
3611
+
3612
+ #[ cargo_test]
3613
+ fn differ_only_by_metadata_with_lockfile ( ) {
3614
+ let p = project ( )
3615
+ . file (
3616
+ "Cargo.toml" ,
3617
+ r#"
3618
+ [package]
3619
+ name = "foo"
3620
+ version = "0.0.1"
3621
+ authors = []
3622
+
3623
+ [dependencies]
3624
+ baz = "=0.0.1"
3625
+ "# ,
3626
+ )
3627
+ . file ( "src/main.rs" , "fn main() {}" )
3628
+ . build ( ) ;
3629
+
3630
+ Package :: new ( "baz" , "0.0.1+a" ) . publish ( ) ;
3631
+ Package :: new ( "baz" , "0.0.1+b" ) . publish ( ) ;
3632
+ Package :: new ( "baz" , "0.0.1+c" ) . publish ( ) ;
3633
+
3634
+ p. cargo ( "update --package baz --precise 0.0.1+b" )
3635
+ . with_stderr (
3636
+ "\
3637
+ [UPDATING] [..] index
3638
+ [..] baz v0.0.1+c -> v0.0.1+b
3639
+ " ,
3640
+ )
3641
+ . run ( ) ;
3642
+
3643
+ p. cargo ( "check" )
3644
+ . with_stderr (
3645
+ "\
3646
+ [DOWNLOADING] crates ...
3647
+ [DOWNLOADED] [..] v0.0.1+b (registry `dummy-registry`)
3648
+ [CHECKING] baz v0.0.1+b
3649
+ [CHECKING] foo v0.0.1 ([CWD])
3650
+ [FINISHED] dev [unoptimized + debuginfo] target(s) in [..]s
3600
3651
" ,
3601
3652
)
3602
3653
. run ( ) ;
You can’t perform that action at this time.
0 commit comments