File tree Expand file tree Collapse file tree 1 file changed +41
-0
lines changed Expand file tree Collapse file tree 1 file changed +41
-0
lines changed Original file line number Diff line number Diff line change @@ -5508,6 +5508,47 @@ for more information about build script outputs.
5508
5508
. run ( ) ;
5509
5509
}
5510
5510
5511
+ #[ cargo_test]
5512
+ fn test_new_syntax_with_old_msrv_and_reserved_prefix ( ) {
5513
+ let p = project ( )
5514
+ . file (
5515
+ "Cargo.toml" ,
5516
+ r#"
5517
+ [package]
5518
+ name = "foo"
5519
+ version = "0.5.0"
5520
+ edition = "2015"
5521
+ authors = []
5522
+ build = "build.rs"
5523
+ rust-version = "1.60.0"
5524
+ "# ,
5525
+ )
5526
+ . file ( "src/lib.rs" , "" )
5527
+ . file (
5528
+ "build.rs" ,
5529
+ r#"
5530
+ fn main() {
5531
+ println!("cargo::rustc-check-cfg=cfg(foo)");
5532
+ }
5533
+ "# ,
5534
+ )
5535
+ . build ( ) ;
5536
+
5537
+ p. cargo ( "build" )
5538
+ . with_status ( 101 )
5539
+ . with_stderr_contains (
5540
+ "\
5541
+ [COMPILING] foo [..]
5542
+ error: the `cargo::` syntax for build script output instructions was added in Rust 1.77.0, \
5543
+ but the minimum supported Rust version of `foo v0.5.0 ([ROOT]/foo)` is 1.60.0.
5544
+ Consider using the old `cargo:` syntax in front of `rustc-check-cfg=`.
5545
+ See https://doc.rust-lang.org/cargo/reference/build-scripts.html#outputs-of-the-build-script \
5546
+ for more information about build script outputs.
5547
+ " ,
5548
+ )
5549
+ . run ( ) ;
5550
+ }
5551
+
5511
5552
#[ cargo_test]
5512
5553
fn test_new_syntax_with_compatible_partial_msrv ( ) {
5513
5554
let p = project ( )
You can’t perform that action at this time.
0 commit comments