@@ -834,6 +834,30 @@ LL - println!("{}", format!("{}", local_i32));
834834LL + println!("{}", format!("{local_i32}"));
835835 |
836836
837+ error: variables can be used directly in the `format!` string
838+ --> $DIR/uninlined_format_args.rs:127:5
839+ |
840+ LL | my_println!("{}", local_i32);
841+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
842+ |
843+ help: change this to
844+ |
845+ LL - my_println!("{}", local_i32);
846+ LL + my_println!("{local_i32}");
847+ |
848+
849+ error: variables can be used directly in the `format!` string
850+ --> $DIR/uninlined_format_args.rs:128:5
851+ |
852+ LL | my_println_args!("{}", local_i32);
853+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
854+ |
855+ help: change this to
856+ |
857+ LL - my_println_args!("{}", local_i32);
858+ LL + my_println_args!("{local_i32}");
859+ |
860+
837861error: variables can be used directly in the `format!` string
838862 --> $DIR/uninlined_format_args.rs:144:5
839863 |
@@ -893,7 +917,7 @@ LL + panic!("p3 {local_i32}");
893917 |
894918
895919error: variables can be used directly in the `format!` string
896- --> $DIR/uninlined_format_args.rs:181 :5
920+ --> $DIR/uninlined_format_args.rs:177 :5
897921 |
898922LL | println!("expand='{}'", local_i32);
899923 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -904,5 +928,29 @@ LL - println!("expand='{}'", local_i32);
904928LL + println!("expand='{local_i32}'");
905929 |
906930
907- error: aborting due to 76 previous errors
931+ error: variables can be used directly in the `format!` string
932+ --> $DIR/uninlined_format_args.rs:210:5
933+ |
934+ LL | my_println2!(true, "{}", local_i32);
935+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
936+ |
937+ help: change this to
938+ |
939+ LL - my_println2!(true, "{}", local_i32);
940+ LL + my_println2!(true, "{local_i32}");
941+ |
942+
943+ error: variables can be used directly in the `format!` string
944+ --> $DIR/uninlined_format_args.rs:211:5
945+ |
946+ LL | my_println2_args!(true, "{}", local_i32);
947+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
948+ |
949+ help: change this to
950+ |
951+ LL - my_println2_args!(true, "{}", local_i32);
952+ LL + my_println2_args!(true, "{local_i32}");
953+ |
954+
955+ error: aborting due to 80 previous errors
908956
0 commit comments