File tree 1 file changed +27
-0
lines changed
1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -2463,3 +2463,30 @@ For more information, try '--help'.
2463
2463
. with_status ( 1 )
2464
2464
. run ( ) ;
2465
2465
}
2466
+
2467
+ #[ cargo_test]
2468
+ fn install_incompat_msrv ( ) {
2469
+ Package :: new ( "foo" , "0.1.0" )
2470
+ . file ( "src/main.rs" , "fn main() {}" )
2471
+ . rust_version ( "1.30" )
2472
+ . publish ( ) ;
2473
+ Package :: new ( "foo" , "0.2.0" )
2474
+ . file ( "src/main.rs" , "fn main() {}" )
2475
+ . rust_version ( "1.9876.0" )
2476
+ . publish ( ) ;
2477
+
2478
+ cargo_process ( "install foo" )
2479
+ . with_stderr ( "\
2480
+ [UPDATING] `dummy-registry` index
2481
+ [DOWNLOADING] crates ...
2482
+ [DOWNLOADED] foo v0.2.0 (registry `[..]`)
2483
+ [INSTALLING] foo v0.2.0
2484
+ [ERROR] failed to compile `foo v0.2.0`, intermediate artifacts can be found at `[..]`.
2485
+ To reuse those artifacts with a future compilation, set the environment variable `CARGO_TARGET_DIR` to that path.
2486
+
2487
+ Caused by:
2488
+ package `foo v0.2.0` cannot be built because it requires rustc 1.9876.0 or newer, while the currently active rustc version is [..]
2489
+ Try re-running cargo install with `--locked`
2490
+ " )
2491
+ . with_status ( 101 ) . run ( ) ;
2492
+ }
You can’t perform that action at this time.
0 commit comments