@@ -958,6 +958,46 @@ fn cargo_install_ignores_msrv_config() {
958958 . run ( ) ;
959959}
960960
961+ #[ cargo_test( nightly, reason = "edition2024 in rustc is unstable" ) ]
962+ fn cargo_install_ignores_resolver_v3_msrv_change ( ) {
963+ Package :: new ( "dep" , "1.0.0" )
964+ . rust_version ( "1.50" )
965+ . file ( "src/lib.rs" , "fn hello() {}" )
966+ . publish ( ) ;
967+ Package :: new ( "dep" , "1.1.0" )
968+ . rust_version ( "1.70" )
969+ . file ( "src/lib.rs" , "fn hello() {}" )
970+ . publish ( ) ;
971+ Package :: new ( "foo" , "0.0.1" )
972+ . rust_version ( "1.60" )
973+ . cargo_feature ( "edition2024" )
974+ . resolver ( "3" )
975+ . file ( "src/main.rs" , "fn main() {}" )
976+ . dep ( "dep" , "1" )
977+ . publish ( ) ;
978+
979+ cargo_process ( "install foo" )
980+ . arg ( "-Zmsrv-policy" )
981+ . masquerade_as_nightly_cargo ( & [ "edition2024" , "msrv-policy" ] )
982+ . with_stderr_data ( str![ [ r#"
983+ [UPDATING] `dummy-registry` index
984+ [DOWNLOADING] crates ...
985+ [DOWNLOADED] foo v0.0.1 (registry `dummy-registry`)
986+ [INSTALLING] foo v0.0.1
987+ [LOCKING] 1 package to latest compatible version
988+ [DOWNLOADING] crates ...
989+ [DOWNLOADED] dep v1.1.0 (registry `dummy-registry`)
990+ [COMPILING] dep v1.1.0
991+ [COMPILING] foo v0.0.1
992+ [FINISHED] `release` profile [optimized] target(s) in [ELAPSED]s
993+ [INSTALLING] [ROOT]/home/.cargo/bin/foo[EXE]
994+ [INSTALLED] package `foo v0.0.1` (executable `foo[EXE]`)
995+ [WARNING] be sure to add `[ROOT]/home/.cargo/bin` to your PATH to be able to run the installed binaries
996+
997+ "# ] ] )
998+ . run ( ) ;
999+ }
1000+
9611001#[ cargo_test]
9621002fn report_rust_versions ( ) {
9631003 Package :: new ( "dep-only-low-compatible" , "1.55.0" )
0 commit comments