Skip to content

Commit 3fca1e9

Browse files
committed
comment out indoc until fixed
1 parent f2ca390 commit 3fca1e9

File tree

3 files changed

+12
-20
lines changed

3 files changed

+12
-20
lines changed

tests/ui/uninlined_format_args.fixed

+5-3
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#![allow(clippy::format_in_format_args)]
55
#![allow(clippy::print_literal)]
66
#![allow(named_arguments_used_positionally)]
7-
#![allow(unused_variables)]
7+
#![allow(unused_variables, unused_imports)]
88
#![warn(clippy::uninlined_format_args)]
99
#![feature(custom_inner_attributes)]
1010

@@ -106,10 +106,12 @@ fn tester(fn_arg: i32) {
106106
println!("{width:width$.prec$}");
107107
println!("{}", format!("{local_i32}"));
108108

109+
// indoc crate's equivalent of print!(indoc!(...))
110+
printdoc!("foo={}", local_i32);
111+
109112
// these should NOT be modified by the lint
113+
// println!(indoc!("foo={}"), local_i32);
110114
println!(concat!("nope ", "{}"), local_i32);
111-
println!(indoc!("foo={local_i32}"));
112-
printdoc!("foo={}", local_i32);
113115
println!("val='{local_i32}'");
114116
println!("val='{local_i32 }'");
115117
println!("val='{local_i32 }'"); // with tab

tests/ui/uninlined_format_args.rs

+5-3
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#![allow(clippy::format_in_format_args)]
55
#![allow(clippy::print_literal)]
66
#![allow(named_arguments_used_positionally)]
7-
#![allow(unused_variables)]
7+
#![allow(unused_variables, unused_imports)]
88
#![warn(clippy::uninlined_format_args)]
99
#![feature(custom_inner_attributes)]
1010

@@ -109,10 +109,12 @@ fn tester(fn_arg: i32) {
109109
println!("{:w$.p$}", w = width, p = prec);
110110
println!("{}", format!("{}", local_i32));
111111

112+
// indoc crate's equivalent of print!(indoc!(...))
113+
printdoc!("foo={}", local_i32);
114+
112115
// these should NOT be modified by the lint
116+
// println!(indoc!("foo={}"), local_i32);
113117
println!(concat!("nope ", "{}"), local_i32);
114-
println!(indoc!("foo={}"), local_i32);
115-
printdoc!("foo={}", local_i32);
116118
println!("val='{local_i32}'");
117119
println!("val='{local_i32 }'");
118120
println!("val='{local_i32 }'"); // with tab

tests/ui/uninlined_format_args.stderr

+2-14
Original file line numberDiff line numberDiff line change
@@ -851,19 +851,7 @@ LL + println!("{}", format!("{local_i32}"));
851851
|
852852

853853
error: variables can be used directly in the `format!` string
854-
--> $DIR/uninlined_format_args.rs:114:5
855-
|
856-
LL | println!(indoc!("foo={}"), local_i32);
857-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
858-
|
859-
help: change this to
860-
|
861-
LL - println!(indoc!("foo={}"), local_i32);
862-
LL + println!(indoc!("foo={local_i32}"));
863-
|
864-
865-
error: variables can be used directly in the `format!` string
866-
--> $DIR/uninlined_format_args.rs:141:5
854+
--> $DIR/uninlined_format_args.rs:143:5
867855
|
868856
LL | println!("expand='{}'", local_i32);
869857
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -874,5 +862,5 @@ LL - println!("expand='{}'", local_i32);
874862
LL + println!("expand='{local_i32}'");
875863
|
876864

877-
error: aborting due to 72 previous errors
865+
error: aborting due to 71 previous errors
878866

0 commit comments

Comments
 (0)