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