]> git.lizzy.rs Git - rust.git/blob - tests/ui/format.stderr
Auto merge of #4478 - tsurai:master, r=flip1995
[rust.git] / tests / ui / format.stderr
1 error: useless use of `format!`
2   --> $DIR/format.rs:13:5
3    |
4 LL |     format!("foo");
5    |     ^^^^^^^^^^^^^^^ help: consider using .to_string(): `"foo".to_string();`
6    |
7    = note: `-D clippy::useless-format` implied by `-D warnings`
8
9 error: useless use of `format!`
10   --> $DIR/format.rs:14:5
11    |
12 LL |     format!("{{}}");
13    |     ^^^^^^^^^^^^^^^^ help: consider using .to_string(): `"{}".to_string();`
14
15 error: useless use of `format!`
16   --> $DIR/format.rs:15:5
17    |
18 LL |     format!("{{}} abc {{}}");
19    |     ^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using .to_string(): `"{} abc {}".to_string();`
20
21 error: useless use of `format!`
22   --> $DIR/format.rs:16:5
23    |
24 LL | /     format!(
25 LL | |         r##"foo {{}}
26 LL | | " bar"##
27 LL | |     );
28    | |______^ help: consider using .to_string(): `"foo {}/n/" bar".to_string();`
29
30 error: useless use of `format!`
31   --> $DIR/format.rs:21:5
32    |
33 LL |     format!("{}", "foo");
34    |     ^^^^^^^^^^^^^^^^^^^^^ help: consider using .to_string(): `"foo".to_string();`
35
36 error: useless use of `format!`
37   --> $DIR/format.rs:25:5
38    |
39 LL |     format!("{:+}", "foo"); // Warn when the format makes no difference.
40    |     ^^^^^^^^^^^^^^^^^^^^^^^ help: consider using .to_string(): `"foo".to_string();`
41
42 error: useless use of `format!`
43   --> $DIR/format.rs:26:5
44    |
45 LL |     format!("{:<}", "foo"); // Warn when the format makes no difference.
46    |     ^^^^^^^^^^^^^^^^^^^^^^^ help: consider using .to_string(): `"foo".to_string();`
47
48 error: useless use of `format!`
49   --> $DIR/format.rs:31:5
50    |
51 LL |     format!("{}", arg);
52    |     ^^^^^^^^^^^^^^^^^^^ help: consider using .to_string(): `arg.to_string();`
53
54 error: useless use of `format!`
55   --> $DIR/format.rs:35:5
56    |
57 LL |     format!("{:+}", arg); // Warn when the format makes no difference.
58    |     ^^^^^^^^^^^^^^^^^^^^^ help: consider using .to_string(): `arg.to_string();`
59
60 error: useless use of `format!`
61   --> $DIR/format.rs:36:5
62    |
63 LL |     format!("{:<}", arg); // Warn when the format makes no difference.
64    |     ^^^^^^^^^^^^^^^^^^^^^ help: consider using .to_string(): `arg.to_string();`
65
66 error: useless use of `format!`
67   --> $DIR/format.rs:63:5
68    |
69 LL |     format!("{}", 42.to_string());
70    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using .to_string(): `42.to_string();`
71
72 error: useless use of `format!`
73   --> $DIR/format.rs:65:5
74    |
75 LL |     format!("{}", x.display().to_string());
76    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using .to_string(): `x.display().to_string();`
77
78 error: useless use of `format!`
79   --> $DIR/format.rs:69:18
80    |
81 LL |     let _ = Some(format!("{}", a + "bar"));
82    |                  ^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using .to_string(): `a + "bar"`
83
84 error: aborting due to 13 previous errors
85