File tree Expand file tree Collapse file tree 1 file changed +38
-0
lines changed Expand file tree Collapse file tree 1 file changed +38
-0
lines changed Original file line number Diff line number Diff line change @@ -5502,6 +5502,44 @@ for more information about build script outputs.
5502
5502
. run ( ) ;
5503
5503
}
5504
5504
5505
+ #[ cargo_test]
5506
+ fn test_new_syntax_with_compatible_partial_msrv ( ) {
5507
+ let p = project ( )
5508
+ . file (
5509
+ "Cargo.toml" ,
5510
+ r#"
5511
+ [package]
5512
+ name = "foo"
5513
+ edition = "2015"
5514
+ build = "build.rs"
5515
+ rust-version = "1.77"
5516
+ "# ,
5517
+ )
5518
+ . file ( "src/lib.rs" , "" )
5519
+ . file (
5520
+ "build.rs" ,
5521
+ r#"
5522
+ fn main() {
5523
+ println!("cargo::metadata=foo=bar");
5524
+ }
5525
+ "# ,
5526
+ )
5527
+ . build ( ) ;
5528
+
5529
+ p. cargo ( "check" )
5530
+ . with_status ( 101 )
5531
+ . with_stderr_contains (
5532
+ "\
5533
+ [COMPILING] foo [..]
5534
+ [ERROR] the `cargo::` syntax for build script output instructions was added in Rust 1.77.0, \
5535
+ but the minimum supported Rust version of `foo v0.0.0 ([ROOT]/foo)` is 1.77.
5536
+ See https://doc.rust-lang.org/cargo/reference/build-scripts.html#outputs-of-the-build-script \
5537
+ for more information about build script outputs.
5538
+ " ,
5539
+ )
5540
+ . run ( ) ;
5541
+ }
5542
+
5505
5543
#[ cargo_test]
5506
5544
fn test_old_syntax_with_old_msrv ( ) {
5507
5545
let p = project ( )
You can’t perform that action at this time.
0 commit comments