]> git.lizzy.rs Git - rust.git/blob - tests/ui/strings.stderr
Merge pull request #2984 from flip1995/single_char_pattern
[rust.git] / tests / ui / strings.stderr
1 error: manual implementation of an assign operation
2   --> $DIR/strings.rs:10:9
3    |
4 10 |         x = x + ".";
5    |         ^^^^^^^^^^^ help: replace it with: `x += "."`
6    |
7    = note: `-D assign-op-pattern` implied by `-D warnings`
8
9 error: you added something to a string. Consider using `String::push_str()` instead
10   --> $DIR/strings.rs:10:13
11    |
12 10 |         x = x + ".";
13    |             ^^^^^^^
14    |
15    = note: `-D string-add` implied by `-D warnings`
16
17 error: you added something to a string. Consider using `String::push_str()` instead
18   --> $DIR/strings.rs:14:13
19    |
20 14 |     let z = y + "...";
21    |             ^^^^^^^^^
22
23 error: you assigned the result of adding something to this string. Consider using `String::push_str()` instead
24   --> $DIR/strings.rs:24:9
25    |
26 24 |         x = x + ".";
27    |         ^^^^^^^^^^^
28    |
29    = note: `-D string-add-assign` implied by `-D warnings`
30
31 error: manual implementation of an assign operation
32   --> $DIR/strings.rs:24:9
33    |
34 24 |         x = x + ".";
35    |         ^^^^^^^^^^^ help: replace it with: `x += "."`
36
37 error: you assigned the result of adding something to this string. Consider using `String::push_str()` instead
38   --> $DIR/strings.rs:38:9
39    |
40 38 |         x = x + ".";
41    |         ^^^^^^^^^^^
42
43 error: manual implementation of an assign operation
44   --> $DIR/strings.rs:38:9
45    |
46 38 |         x = x + ".";
47    |         ^^^^^^^^^^^ help: replace it with: `x += "."`
48
49 error: you added something to a string. Consider using `String::push_str()` instead
50   --> $DIR/strings.rs:42:13
51    |
52 42 |     let z = y + "...";
53    |             ^^^^^^^^^
54
55 error: calling `as_bytes()` on a string literal
56   --> $DIR/strings.rs:50:14
57    |
58 50 |     let bs = "hello there".as_bytes();
59    |              ^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using a byte string literal instead: `b"hello there"`
60    |
61    = note: `-D string-lit-as-bytes` implied by `-D warnings`
62
63 error: calling `as_bytes()` on a string literal
64   --> $DIR/strings.rs:55:18
65    |
66 55 |     let strify = stringify!(foobar).as_bytes();
67    |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using a byte string literal instead: `bstringify!(foobar)`
68
69 error: manual implementation of an assign operation
70   --> $DIR/strings.rs:65:7
71    |
72 65 |     ; x = x + 1;
73    |       ^^^^^^^^^ help: replace it with: `x += 1`
74
75 error: aborting due to 11 previous errors
76