Skip to content

Commit 270cbfe

Browse files
committed
Add ui test parser/issues/invalid-parse-format-issue-139104.rs
Signed-off-by: xizheyin <[email protected]>
1 parent 645d0ad commit 270cbfe

File tree

2 files changed

+30
-0
lines changed

2 files changed

+30
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
fn main() {
2+
println!("{foo:_1.4}", foo = 3.14); //~ ERROR invalid format string: tuple index access isn't supported
3+
println!("{foo:1.4_1.4}", foo = 3.14); //~ ERROR invalid format string: tuple index access isn't supported
4+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
error: invalid format string: tuple index access isn't supported
2+
--> $DIR/invalid-parse-format-issue-139104.rs:2:16
3+
|
4+
LL | println!("{foo:_1.4}", foo = 3.14);
5+
| ^^^^^^^^ not supported in format string
6+
|
7+
help: consider using a positional formatting argument instead
8+
|
9+
LL - println!("{foo:_1.4}", foo = 3.14);
10+
LL + println!("{0}", foo:_1.4, foo = 3.14);
11+
|
12+
13+
error: invalid format string: tuple index access isn't supported
14+
--> $DIR/invalid-parse-format-issue-139104.rs:3:16
15+
|
16+
LL | println!("{foo:1.4_1.4}", foo = 3.14);
17+
| ^^^^^^^^^^^ not supported in format string
18+
|
19+
help: consider using a positional formatting argument instead
20+
|
21+
LL - println!("{foo:1.4_1.4}", foo = 3.14);
22+
LL + println!("{0}", foo:1.4_1.4, foo = 3.14);
23+
|
24+
25+
error: aborting due to 2 previous errors
26+

0 commit comments

Comments
 (0)