rust/tests/ui/strings.stderr

75 lines
2.3 KiB
Plaintext
Raw Normal View History

error: manual implementation of an assign operation
2017-08-01 17:54:21 +02:00
--> $DIR/strings.rs:10:9
|
10 | x = x + ".";
2017-07-21 10:40:23 +02:00
| ^^^^^^^^^^^ help: replace it with: `x += "."`
|
= note: `-D assign-op-pattern` implied by `-D warnings`
error: you added something to a string. Consider using `String::push_str()` instead
2017-08-01 17:54:21 +02:00
--> $DIR/strings.rs:10:13
|
2017-02-08 14:58:07 +01:00
10 | x = x + ".";
| ^^^^^^^
|
= note: `-D string-add` implied by `-D warnings`
error: you added something to a string. Consider using `String::push_str()` instead
2017-08-01 17:54:21 +02:00
--> $DIR/strings.rs:14:13
|
2017-02-08 14:58:07 +01:00
14 | let z = y + "...";
| ^^^^^^^^^
error: you assigned the result of adding something to this string. Consider using `String::push_str()` instead
2017-08-01 17:54:21 +02:00
--> $DIR/strings.rs:24:9
|
2017-02-08 14:58:07 +01:00
24 | x = x + ".";
| ^^^^^^^^^^^
|
= note: `-D string-add-assign` implied by `-D warnings`
error: manual implementation of an assign operation
2017-08-01 17:54:21 +02:00
--> $DIR/strings.rs:24:9
|
24 | x = x + ".";
2017-07-21 10:40:23 +02:00
| ^^^^^^^^^^^ help: replace it with: `x += "."`
error: you assigned the result of adding something to this string. Consider using `String::push_str()` instead
2017-08-01 17:54:21 +02:00
--> $DIR/strings.rs:38:9
|
2017-02-08 14:58:07 +01:00
38 | x = x + ".";
| ^^^^^^^^^^^
error: manual implementation of an assign operation
2017-08-01 17:54:21 +02:00
--> $DIR/strings.rs:38:9
|
38 | x = x + ".";
2017-07-21 10:40:23 +02:00
| ^^^^^^^^^^^ help: replace it with: `x += "."`
error: you added something to a string. Consider using `String::push_str()` instead
2017-08-01 17:54:21 +02:00
--> $DIR/strings.rs:42:13
|
2017-02-08 14:58:07 +01:00
42 | let z = y + "...";
| ^^^^^^^^^
error: calling `as_bytes()` on a string literal
2017-08-01 17:54:21 +02:00
--> $DIR/strings.rs:50:14
|
50 | let bs = "hello there".as_bytes();
2017-07-21 10:40:23 +02:00
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using a byte string literal instead: `b"hello there"`
|
= note: `-D string-lit-as-bytes` implied by `-D warnings`
2017-07-21 10:40:23 +02:00
error: calling `as_bytes()` on a string literal
2017-08-01 17:54:21 +02:00
--> $DIR/strings.rs:55:18
2017-07-21 10:40:23 +02:00
|
55 | let strify = stringify!(foobar).as_bytes();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using a byte string literal instead: `bstringify!(foobar)`
error: manual implementation of an assign operation
2017-08-01 17:54:21 +02:00
--> $DIR/strings.rs:65:7
|
65 | ; x = x + 1;
2017-07-21 10:40:23 +02:00
| ^^^^^^^^^ help: replace it with: `x += 1`