11error: literal with an empty format string
2- --> $DIR/print_literal.rs:27 :24
2+ --> $DIR/print_literal.rs:29 :24
33 |
44LL | print!("Hello {}", "world");
55 | ^^^^^^^
@@ -12,7 +12,7 @@ LL + print!("Hello world");
1212 |
1313
1414error: literal with an empty format string
15- --> $DIR/print_literal.rs:28 :36
15+ --> $DIR/print_literal.rs:30 :36
1616 |
1717LL | println!("Hello {} {}", world, "world");
1818 | ^^^^^^^
@@ -24,7 +24,7 @@ LL + println!("Hello {} world", world);
2424 |
2525
2626error: literal with an empty format string
27- --> $DIR/print_literal.rs:29 :26
27+ --> $DIR/print_literal.rs:31 :26
2828 |
2929LL | println!("Hello {}", "world");
3030 | ^^^^^^^
@@ -36,7 +36,7 @@ LL + println!("Hello world");
3636 |
3737
3838error: literal with an empty format string
39- --> $DIR/print_literal.rs:30 :26
39+ --> $DIR/print_literal.rs:32 :26
4040 |
4141LL | println!("{} {:.4}", "a literal", 5);
4242 | ^^^^^^^^^^^
@@ -48,7 +48,7 @@ LL + println!("a literal {:.4}", 5);
4848 |
4949
5050error: literal with an empty format string
51- --> $DIR/print_literal.rs:35 :25
51+ --> $DIR/print_literal.rs:37 :25
5252 |
5353LL | println!("{0} {1}", "hello", "world");
5454 | ^^^^^^^
@@ -60,7 +60,7 @@ LL + println!("hello {1}", "world");
6060 |
6161
6262error: literal with an empty format string
63- --> $DIR/print_literal.rs:35 :34
63+ --> $DIR/print_literal.rs:37 :34
6464 |
6565LL | println!("{0} {1}", "hello", "world");
6666 | ^^^^^^^
@@ -72,7 +72,7 @@ LL + println!("{0} world", "hello");
7272 |
7373
7474error: literal with an empty format string
75- --> $DIR/print_literal.rs:36 :34
75+ --> $DIR/print_literal.rs:38 :34
7676 |
7777LL | println!("{1} {0}", "hello", "world");
7878 | ^^^^^^^
@@ -84,7 +84,7 @@ LL + println!("world {0}", "hello");
8484 |
8585
8686error: literal with an empty format string
87- --> $DIR/print_literal.rs:36 :25
87+ --> $DIR/print_literal.rs:38 :25
8888 |
8989LL | println!("{1} {0}", "hello", "world");
9090 | ^^^^^^^
@@ -96,7 +96,7 @@ LL + println!("{1} hello", "world");
9696 |
9797
9898error: literal with an empty format string
99- --> $DIR/print_literal.rs:39 :35
99+ --> $DIR/print_literal.rs:41 :35
100100 |
101101LL | println!("{foo} {bar}", foo = "hello", bar = "world");
102102 | ^^^^^^^
@@ -108,7 +108,7 @@ LL + println!("hello {bar}", bar = "world");
108108 |
109109
110110error: literal with an empty format string
111- --> $DIR/print_literal.rs:39 :50
111+ --> $DIR/print_literal.rs:41 :50
112112 |
113113LL | println!("{foo} {bar}", foo = "hello", bar = "world");
114114 | ^^^^^^^
@@ -120,7 +120,7 @@ LL + println!("{foo} world", foo = "hello");
120120 |
121121
122122error: literal with an empty format string
123- --> $DIR/print_literal.rs:40 :50
123+ --> $DIR/print_literal.rs:42 :50
124124 |
125125LL | println!("{bar} {foo}", foo = "hello", bar = "world");
126126 | ^^^^^^^
@@ -132,7 +132,7 @@ LL + println!("world {foo}", foo = "hello");
132132 |
133133
134134error: literal with an empty format string
135- --> $DIR/print_literal.rs:40 :35
135+ --> $DIR/print_literal.rs:42 :35
136136 |
137137LL | println!("{bar} {foo}", foo = "hello", bar = "world");
138138 | ^^^^^^^
@@ -143,5 +143,77 @@ LL - println!("{bar} {foo}", foo = "hello", bar = "world");
143143LL + println!("{bar} hello", bar = "world");
144144 |
145145
146- error: aborting due to 12 previous errors
146+ error: literal with an empty format string
147+ --> $DIR/print_literal.rs:49:20
148+ |
149+ LL | println!("{}", "{} /x00 /u{ab123} ///u{ab123} {:?}");
150+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
151+ |
152+ help: try
153+ |
154+ LL - println!("{}", "{} /x00 /u{ab123} ///u{ab123} {:?}");
155+ LL + println!("{{}} /x00 /u{ab123} ///u{ab123} {{:?}}");
156+ |
157+
158+ error: literal with an empty format string
159+ --> $DIR/print_literal.rs:53:20
160+ |
161+ LL | println!("{}", r"/u{ab123} /u{{");
162+ | ^^^^^^^^^^^^^^^^^
163+ |
164+ help: try
165+ |
166+ LL - println!("{}", r"/u{ab123} /u{{");
167+ LL + println!("//u{{ab123}} //u{{{{");
168+ |
169+
170+ error: literal with an empty format string
171+ --> $DIR/print_literal.rs:54:21
172+ |
173+ LL | println!(r"{}", r"/u{ab123} /u{{");
174+ | ^^^^^^^^^^^^^^^^^
175+ |
176+ help: try
177+ |
178+ LL - println!(r"{}", r"/u{ab123} /u{{");
179+ LL + println!(r"/u{{ab123}} /u{{{{");
180+ |
181+
182+ error: literal with an empty format string
183+ --> $DIR/print_literal.rs:55:20
184+ |
185+ LL | println!("{}", r"/{ab123} /u{{");
186+ | ^^^^^^^^^^^^^^^^
187+ |
188+ help: try
189+ |
190+ LL - println!("{}", r"/{ab123} /u{{");
191+ LL + println!("//{{ab123}} //u{{{{");
192+ |
193+
194+ error: literal with an empty format string
195+ --> $DIR/print_literal.rs:56:20
196+ |
197+ LL | println!("{}", "//u{ab123}");
198+ | ^^^^^^^^^^^^
199+ |
200+ help: try
201+ |
202+ LL - println!("{}", "//u{ab123}");
203+ LL + println!("//u{{ab123}}");
204+ |
205+
206+ error: literal with an empty format string
207+ --> $DIR/print_literal.rs:58:35
208+ |
209+ LL | println!("mixed: {} {world}", "{hello}");
210+ | ^^^^^^^^^
211+ |
212+ help: try
213+ |
214+ LL - println!("mixed: {} {world}", "{hello}");
215+ LL + println!("mixed: {{hello}} {world}");
216+ |
217+
218+ error: aborting due to 18 previous errors
147219
0 commit comments