]> git.proxmox.com Git - rustc.git/blobdiff - src/tools/clippy/tests/ui/string_add_assign.stderr
New upstream version 1.52.1+dfsg1
[rustc.git] / src / tools / clippy / tests / ui / string_add_assign.stderr
diff --git a/src/tools/clippy/tests/ui/string_add_assign.stderr b/src/tools/clippy/tests/ui/string_add_assign.stderr
new file mode 100644 (file)
index 0000000..7676175
--- /dev/null
@@ -0,0 +1,24 @@
+error: you assigned the result of adding something to this string. Consider using `String::push_str()` instead
+  --> $DIR/string_add_assign.rs:10:9
+   |
+LL |         x = x + ".";
+   |         ^^^^^^^^^^^
+   |
+   = note: `-D clippy::string-add-assign` implied by `-D warnings`
+
+error: manual implementation of an assign operation
+  --> $DIR/string_add_assign.rs:10:9
+   |
+LL |         x = x + ".";
+   |         ^^^^^^^^^^^ help: replace it with: `x += "."`
+   |
+   = note: `-D clippy::assign-op-pattern` implied by `-D warnings`
+
+error: manual implementation of an assign operation
+  --> $DIR/string_add_assign.rs:19:5
+   |
+LL |     x = x + 1;
+   |     ^^^^^^^^^ help: replace it with: `x += 1`
+
+error: aborting due to 3 previous errors
+