File tree 2 files changed +6
-4
lines changed
2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -737,10 +737,12 @@ impl BuildOutput {
737
737
let new_syntax_added_in = RustVersion :: from_str ( "1.77.0" ) ?;
738
738
if !new_syntax_added_in. is_compatible_with ( msrv. as_partial ( ) ) {
739
739
let old_syntax_suggestion = if has_reserved_prefix ( flag) {
740
- format ! ( "Consider using the old `cargo:` syntax in front of `{flag}`.\n " )
740
+ format ! (
741
+ "Switch to the old `cargo:{flag}` syntax (note the single colon).\n "
742
+ )
741
743
} else if flag. starts_with ( "metadata=" ) {
742
744
let old_format_flag = flag. strip_prefix ( "metadata=" ) . unwrap ( ) ;
743
- format ! ( "Consider using the old `cargo:{old_format_flag}` syntax instead of `cargo::{flag}` (note the single colon).\n " )
745
+ format ! ( "Switch to the old `cargo:{old_format_flag}` syntax instead of `cargo::{flag}` (note the single colon).\n " )
744
746
} else {
745
747
String :: new ( )
746
748
} ;
Original file line number Diff line number Diff line change @@ -5501,7 +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
+ Switch to the old `cargo:foo=bar` syntax instead of `cargo::metadata=foo=bar` (note the single colon).
5505
5505
See https://doc.rust-lang.org/cargo/reference/build-scripts.html#outputs-of-the-build-script \
5506
5506
for more information about build script outputs.
5507
5507
" ,
@@ -5542,7 +5542,7 @@ fn test_new_syntax_with_old_msrv_and_reserved_prefix() {
5542
5542
[COMPILING] foo [..]
5543
5543
[ERROR] the `cargo::` syntax for build script output instructions was added in Rust 1.77.0, \
5544
5544
but the minimum supported Rust version of `foo v0.5.0 ([ROOT]/foo)` is 1.60.0.
5545
- Consider using the old `cargo:` syntax in front of ` rustc-check-cfg=cfg(foo)`.
5545
+ Switch to the old `cargo:rustc-check-cfg=cfg(foo)` syntax (note the single colon) .
5546
5546
See https://doc.rust-lang.org/cargo/reference/build-scripts.html#outputs-of-the-build-script \
5547
5547
for more information about build script outputs.
5548
5548
" ,
You can’t perform that action at this time.
0 commit comments