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 @@ -5501,6 +5501,7 @@ fn test_new_syntax_with_old_msrv() {
5501
5501
[COMPILING] foo [..]
5502
5502
error: the `cargo::` syntax for build script output instructions was added in Rust 1.77.0, \
5503
5503
but the minimum supported Rust version of `foo v0.5.0 ([ROOT]/foo)` is 1.60.0.
5504
+ Consider using the old `cargo:foo=bar` syntax instead of `cargo::metadata=foo=bar` (note the single colon).
5504
5505
See https://doc.rust-lang.org/cargo/reference/build-scripts.html#outputs-of-the-build-script \
5505
5506
for more information about build script outputs.
5506
5507
" ,
@@ -5549,6 +5550,46 @@ for more information about build script outputs.
5549
5550
. run ( ) ;
5550
5551
}
5551
5552
5553
+ #[ cargo_test]
5554
+ fn test_new_syntax_with_old_msrv_and_unknown_prefix ( ) {
5555
+ let p = project ( )
5556
+ . file (
5557
+ "Cargo.toml" ,
5558
+ r#"
5559
+ [package]
5560
+ name = "foo"
5561
+ version = "0.5.0"
5562
+ edition = "2015"
5563
+ authors = []
5564
+ build = "build.rs"
5565
+ rust-version = "1.60.0"
5566
+ "# ,
5567
+ )
5568
+ . file ( "src/lib.rs" , "" )
5569
+ . file (
5570
+ "build.rs" ,
5571
+ r#"
5572
+ fn main() {
5573
+ println!("cargo::foo=bar");
5574
+ }
5575
+ "# ,
5576
+ )
5577
+ . build ( ) ;
5578
+
5579
+ p. cargo ( "build" )
5580
+ . with_status ( 101 )
5581
+ . with_stderr_contains (
5582
+ "\
5583
+ [COMPILING] foo [..]
5584
+ error: the `cargo::` syntax for build script output instructions was added in Rust 1.77.0, \
5585
+ but the minimum supported Rust version of `foo v0.5.0 ([ROOT]/foo)` is 1.60.0.
5586
+ See https://doc.rust-lang.org/cargo/reference/build-scripts.html#outputs-of-the-build-script \
5587
+ for more information about build script outputs.
5588
+ " ,
5589
+ )
5590
+ . run ( ) ;
5591
+ }
5592
+
5552
5593
#[ cargo_test]
5553
5594
fn test_new_syntax_with_compatible_partial_msrv ( ) {
5554
5595
let p = project ( )
You can’t perform that action at this time.
0 commit comments