]> git.lizzy.rs Git - rust.git/blobdiff - tests/ui/format_args.stderr
`assertions_on_result_states` fix suggestion when `assert!` not in a statement
[rust.git] / tests / ui / format_args.stderr
index e69999cc9d0215f37e6e74aba1fbc905784ce189..aa6e3659b43b519d19f14fa7ecd395a7d7763bda 100644 (file)
@@ -132,5 +132,11 @@ error: `to_string` applied to a type that implements `Display` in `format!` args
 LL |         let x = format!("{} {}", a, b.to_string());
    |                                      ^^^^^^^^^^^^ help: remove this
 
-error: aborting due to 22 previous errors
+error: `to_string` applied to a type that implements `Display` in `println!` args
+  --> $DIR/format_args.rs:156:24
+   |
+LL |         println!("{}", original[..10].to_string());
+   |                        ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use this: `&original[..10]`
+
+error: aborting due to 23 previous errors