fork/rust

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

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

master
6.9 KiB155 linesraw
1error: `to_string` applied to a type that implements `Display` in `format!` args
2  --> $DIR/format_args.rs:76:72
3   |
4LL |     let _ = format!("error: something failed at {}", Location::caller().to_string());
5   |                                                                        ^^^^^^^^^^^^ help: remove this
6   |
7   = note: `-D clippy::to-string-in-format-args` implied by `-D warnings`
8   = help: to override `-D warnings` add `#[allow(clippy::to_string_in_format_args)]`
9
10error: `to_string` applied to a type that implements `Display` in `write!` args
11  --> $DIR/format_args.rs:80:27
12   |
13LL |         Location::caller().to_string()
14   |                           ^^^^^^^^^^^^ help: remove this
15
16error: `to_string` applied to a type that implements `Display` in `writeln!` args
17  --> $DIR/format_args.rs:85:27
18   |
19LL |         Location::caller().to_string()
20   |                           ^^^^^^^^^^^^ help: remove this
21
22error: `to_string` applied to a type that implements `Display` in `print!` args
23  --> $DIR/format_args.rs:87:63
24   |
25LL |     print!("error: something failed at {}", Location::caller().to_string());
26   |                                                               ^^^^^^^^^^^^ help: remove this
27
28error: `to_string` applied to a type that implements `Display` in `println!` args
29  --> $DIR/format_args.rs:88:65
30   |
31LL |     println!("error: something failed at {}", Location::caller().to_string());
32   |                                                                 ^^^^^^^^^^^^ help: remove this
33
34error: `to_string` applied to a type that implements `Display` in `eprint!` args
35  --> $DIR/format_args.rs:89:64
36   |
37LL |     eprint!("error: something failed at {}", Location::caller().to_string());
38   |                                                                ^^^^^^^^^^^^ help: remove this
39
40error: `to_string` applied to a type that implements `Display` in `eprintln!` args
41  --> $DIR/format_args.rs:90:66
42   |
43LL |     eprintln!("error: something failed at {}", Location::caller().to_string());
44   |                                                                  ^^^^^^^^^^^^ help: remove this
45
46error: `to_string` applied to a type that implements `Display` in `format_args!` args
47  --> $DIR/format_args.rs:91:77
48   |
49LL |     let _ = format_args!("error: something failed at {}", Location::caller().to_string());
50   |                                                                             ^^^^^^^^^^^^ help: remove this
51
52error: `to_string` applied to a type that implements `Display` in `assert!` args
53  --> $DIR/format_args.rs:92:70
54   |
55LL |     assert!(true, "error: something failed at {}", Location::caller().to_string());
56   |                                                                      ^^^^^^^^^^^^ help: remove this
57
58error: `to_string` applied to a type that implements `Display` in `assert_eq!` args
59  --> $DIR/format_args.rs:93:73
60   |
61LL |     assert_eq!(0, 0, "error: something failed at {}", Location::caller().to_string());
62   |                                                                         ^^^^^^^^^^^^ help: remove this
63
64error: `to_string` applied to a type that implements `Display` in `assert_ne!` args
65  --> $DIR/format_args.rs:94:73
66   |
67LL |     assert_ne!(0, 0, "error: something failed at {}", Location::caller().to_string());
68   |                                                                         ^^^^^^^^^^^^ help: remove this
69
70error: `to_string` applied to a type that implements `Display` in `panic!` args
71  --> $DIR/format_args.rs:95:63
72   |
73LL |     panic!("error: something failed at {}", Location::caller().to_string());
74   |                                                               ^^^^^^^^^^^^ help: remove this
75
76error: `to_string` applied to a type that implements `Display` in `println!` args
77  --> $DIR/format_args.rs:96:20
78   |
79LL |     println!("{}", X(1).to_string());
80   |                    ^^^^^^^^^^^^^^^^ help: use this: `*X(1)`
81
82error: `to_string` applied to a type that implements `Display` in `println!` args
83  --> $DIR/format_args.rs:97:20
84   |
85LL |     println!("{}", Y(&X(1)).to_string());
86   |                    ^^^^^^^^^^^^^^^^^^^^ help: use this: `***Y(&X(1))`
87
88error: `to_string` applied to a type that implements `Display` in `println!` args
89  --> $DIR/format_args.rs:98:24
90   |
91LL |     println!("{}", Z(1).to_string());
92   |                        ^^^^^^^^^^^^ help: remove this
93
94error: `to_string` applied to a type that implements `Display` in `println!` args
95  --> $DIR/format_args.rs:99:20
96   |
97LL |     println!("{}", x.to_string());
98   |                    ^^^^^^^^^^^^^ help: use this: `**x`
99
100error: `to_string` applied to a type that implements `Display` in `println!` args
101  --> $DIR/format_args.rs:100:20
102   |
103LL |     println!("{}", x_ref.to_string());
104   |                    ^^^^^^^^^^^^^^^^^ help: use this: `***x_ref`
105
106error: `to_string` applied to a type that implements `Display` in `println!` args
107  --> $DIR/format_args.rs:102:39
108   |
109LL |     println!("{foo}{bar}", foo = "foo".to_string(), bar = "bar");
110   |                                       ^^^^^^^^^^^^ help: remove this
111
112error: `to_string` applied to a type that implements `Display` in `println!` args
113  --> $DIR/format_args.rs:103:52
114   |
115LL |     println!("{foo}{bar}", foo = "foo", bar = "bar".to_string());
116   |                                                    ^^^^^^^^^^^^ help: remove this
117
118error: `to_string` applied to a type that implements `Display` in `println!` args
119  --> $DIR/format_args.rs:104:39
120   |
121LL |     println!("{foo}{bar}", bar = "bar".to_string(), foo = "foo");
122   |                                       ^^^^^^^^^^^^ help: remove this
123
124error: `to_string` applied to a type that implements `Display` in `println!` args
125  --> $DIR/format_args.rs:105:52
126   |
127LL |     println!("{foo}{bar}", bar = "bar", foo = "foo".to_string());
128   |                                                    ^^^^^^^^^^^^ help: remove this
129
130error: `to_string` applied to a type that implements `Display` in `print!` args
131  --> $DIR/format_args.rs:117:37
132   |
133LL |     print!("{}", (Location::caller().to_string()));
134   |                                     ^^^^^^^^^^^^ help: remove this
135
136error: `to_string` applied to a type that implements `Display` in `print!` args
137  --> $DIR/format_args.rs:118:39
138   |
139LL |     print!("{}", ((Location::caller()).to_string()));
140   |                                       ^^^^^^^^^^^^ help: remove this
141
142error: `to_string` applied to a type that implements `Display` in `format!` args
143  --> $DIR/format_args.rs:146:38
144   |
145LL |         let x = format!("{} {}", a, b.to_string());
146   |                                      ^^^^^^^^^^^^ help: remove this
147
148error: `to_string` applied to a type that implements `Display` in `println!` args
149  --> $DIR/format_args.rs:160:24
150   |
151LL |         println!("{}", original[..10].to_string());
152   |                        ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use this: `&original[..10]`
153
154error: aborting due to 25 previous errors
155