fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
3.7 KiB148 linesraw
1error: literal with an empty format string
2  --> $DIR/print_literal.rs:27:24
3   |
4LL |     print!("Hello {}", "world");
5   |                        ^^^^^^^
6   |
7   = note: `-D clippy::print-literal` implied by `-D warnings`
8   = help: to override `-D warnings` add `#[allow(clippy::print_literal)]`
9help: try
10   |
11LL -     print!("Hello {}", "world");
12LL +     print!("Hello world");
13   |
14
15error: literal with an empty format string
16  --> $DIR/print_literal.rs:30:36
17   |
18LL |     println!("Hello {} {}", world, "world");
19   |                                    ^^^^^^^
20   |
21help: try
22   |
23LL -     println!("Hello {} {}", world, "world");
24LL +     println!("Hello {} world", world);
25   |
26
27error: literal with an empty format string
28  --> $DIR/print_literal.rs:32:26
29   |
30LL |     println!("Hello {}", "world");
31   |                          ^^^^^^^
32   |
33help: try
34   |
35LL -     println!("Hello {}", "world");
36LL +     println!("Hello world");
37   |
38
39error: literal with an empty format string
40  --> $DIR/print_literal.rs:34:26
41   |
42LL |     println!("{} {:.4}", "a literal", 5);
43   |                          ^^^^^^^^^^^
44   |
45help: try
46   |
47LL -     println!("{} {:.4}", "a literal", 5);
48LL +     println!("a literal {:.4}", 5);
49   |
50
51error: literal with an empty format string
52  --> $DIR/print_literal.rs:40:25
53   |
54LL |     println!("{0} {1}", "hello", "world");
55   |                         ^^^^^^^
56   |
57help: try
58   |
59LL -     println!("{0} {1}", "hello", "world");
60LL +     println!("hello {1}", "world");
61   |
62
63error: literal with an empty format string
64  --> $DIR/print_literal.rs:40:34
65   |
66LL |     println!("{0} {1}", "hello", "world");
67   |                                  ^^^^^^^
68   |
69help: try
70   |
71LL -     println!("{0} {1}", "hello", "world");
72LL +     println!("{0} world", "hello");
73   |
74
75error: literal with an empty format string
76  --> $DIR/print_literal.rs:43:34
77   |
78LL |     println!("{1} {0}", "hello", "world");
79   |                                  ^^^^^^^
80   |
81help: try
82   |
83LL -     println!("{1} {0}", "hello", "world");
84LL +     println!("world {0}", "hello");
85   |
86
87error: literal with an empty format string
88  --> $DIR/print_literal.rs:43:25
89   |
90LL |     println!("{1} {0}", "hello", "world");
91   |                         ^^^^^^^
92   |
93help: try
94   |
95LL -     println!("{1} {0}", "hello", "world");
96LL +     println!("{1} hello", "world");
97   |
98
99error: literal with an empty format string
100  --> $DIR/print_literal.rs:48:35
101   |
102LL |     println!("{foo} {bar}", foo = "hello", bar = "world");
103   |                                   ^^^^^^^
104   |
105help: try
106   |
107LL -     println!("{foo} {bar}", foo = "hello", bar = "world");
108LL +     println!("hello {bar}", bar = "world");
109   |
110
111error: literal with an empty format string
112  --> $DIR/print_literal.rs:48:50
113   |
114LL |     println!("{foo} {bar}", foo = "hello", bar = "world");
115   |                                                  ^^^^^^^
116   |
117help: try
118   |
119LL -     println!("{foo} {bar}", foo = "hello", bar = "world");
120LL +     println!("{foo} world", foo = "hello");
121   |
122
123error: literal with an empty format string
124  --> $DIR/print_literal.rs:51:50
125   |
126LL |     println!("{bar} {foo}", foo = "hello", bar = "world");
127   |                                                  ^^^^^^^
128   |
129help: try
130   |
131LL -     println!("{bar} {foo}", foo = "hello", bar = "world");
132LL +     println!("world {foo}", foo = "hello");
133   |
134
135error: literal with an empty format string
136  --> $DIR/print_literal.rs:51:35
137   |
138LL |     println!("{bar} {foo}", foo = "hello", bar = "world");
139   |                                   ^^^^^^^
140   |
141help: try
142   |
143LL -     println!("{bar} {foo}", foo = "hello", bar = "world");
144LL +     println!("{bar} hello", bar = "world");
145   |
146
147error: aborting due to 12 previous errors
148