summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/tests/ui/print_literal.stderr
blob: 72aae0756033a5593826f90b900296a292a2d0df (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
error: literal with an empty format string
  --> $DIR/print_literal.rs:25:24
   |
LL |     print!("Hello {}", "world");
   |                        ^^^^^^^
   |
   = note: `-D clippy::print-literal` implied by `-D warnings`
help: try this
   |
LL -     print!("Hello {}", "world");
LL +     print!("Hello world");
   |

error: literal with an empty format string
  --> $DIR/print_literal.rs:26:36
   |
LL |     println!("Hello {} {}", world, "world");
   |                                    ^^^^^^^
   |
help: try this
   |
LL -     println!("Hello {} {}", world, "world");
LL +     println!("Hello {} world", world);
   |

error: literal with an empty format string
  --> $DIR/print_literal.rs:27:26
   |
LL |     println!("Hello {}", "world");
   |                          ^^^^^^^
   |
help: try this
   |
LL -     println!("Hello {}", "world");
LL +     println!("Hello world");
   |

error: literal with an empty format string
  --> $DIR/print_literal.rs:32:25
   |
LL |     println!("{0} {1}", "hello", "world");
   |                         ^^^^^^^
   |
help: try this
   |
LL -     println!("{0} {1}", "hello", "world");
LL +     println!("hello {1}", "world");
   |

error: literal with an empty format string
  --> $DIR/print_literal.rs:32:34
   |
LL |     println!("{0} {1}", "hello", "world");
   |                                  ^^^^^^^
   |
help: try this
   |
LL -     println!("{0} {1}", "hello", "world");
LL +     println!("{0} world", "hello");
   |

error: literal with an empty format string
  --> $DIR/print_literal.rs:33:25
   |
LL |     println!("{1} {0}", "hello", "world");
   |                         ^^^^^^^
   |
help: try this
   |
LL -     println!("{1} {0}", "hello", "world");
LL +     println!("{1} hello", "world");
   |

error: literal with an empty format string
  --> $DIR/print_literal.rs:33:34
   |
LL |     println!("{1} {0}", "hello", "world");
   |                                  ^^^^^^^
   |
help: try this
   |
LL -     println!("{1} {0}", "hello", "world");
LL +     println!("world {0}", "hello");
   |

error: literal with an empty format string
  --> $DIR/print_literal.rs:36:29
   |
LL |     println!("{foo} {bar}", foo = "hello", bar = "world");
   |                             ^^^^^^^^^^^^^
   |
help: try this
   |
LL -     println!("{foo} {bar}", foo = "hello", bar = "world");
LL +     println!("hello {bar}", bar = "world");
   |

error: literal with an empty format string
  --> $DIR/print_literal.rs:36:44
   |
LL |     println!("{foo} {bar}", foo = "hello", bar = "world");
   |                                            ^^^^^^^^^^^^^
   |
help: try this
   |
LL -     println!("{foo} {bar}", foo = "hello", bar = "world");
LL +     println!("{foo} world", foo = "hello");
   |

error: literal with an empty format string
  --> $DIR/print_literal.rs:37:29
   |
LL |     println!("{bar} {foo}", foo = "hello", bar = "world");
   |                             ^^^^^^^^^^^^^
   |
help: try this
   |
LL -     println!("{bar} {foo}", foo = "hello", bar = "world");
LL +     println!("{bar} hello", bar = "world");
   |

error: literal with an empty format string
  --> $DIR/print_literal.rs:37:44
   |
LL |     println!("{bar} {foo}", foo = "hello", bar = "world");
   |                                            ^^^^^^^^^^^^^
   |
help: try this
   |
LL -     println!("{bar} {foo}", foo = "hello", bar = "world");
LL +     println!("world {foo}", foo = "hello");
   |

error: aborting due to 11 previous errors