2017-02-07 20:05:30 +00:00
|
|
|
error: you added something to a string. Consider using `String::push_str()` instead
|
|
|
|
--> $DIR/strings.rs:10:13
|
|
|
|
|
|
2017-02-08 13:58:07 +00:00
|
|
|
10 | x = x + ".";
|
2017-02-07 20:05:30 +00:00
|
|
|
| ^^^^^^^
|
|
|
|
|
|
|
|
|
note: lint level defined here
|
|
|
|
--> $DIR/strings.rs:4:8
|
|
|
|
|
|
|
|
|
4 | #[deny(string_add)]
|
|
|
|
| ^^^^^^^^^^
|
|
|
|
|
|
|
|
error: you added something to a string. Consider using `String::push_str()` instead
|
|
|
|
--> $DIR/strings.rs:14:13
|
|
|
|
|
|
2017-02-08 13:58:07 +00:00
|
|
|
14 | let z = y + "...";
|
2017-02-07 20:05:30 +00:00
|
|
|
| ^^^^^^^^^
|
|
|
|
|
|
|
|
error: you assigned the result of adding something to this string. Consider using `String::push_str()` instead
|
|
|
|
--> $DIR/strings.rs:24:9
|
|
|
|
|
|
2017-02-08 13:58:07 +00:00
|
|
|
24 | x = x + ".";
|
2017-02-07 20:05:30 +00:00
|
|
|
| ^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
note: lint level defined here
|
|
|
|
--> $DIR/strings.rs:19:8
|
|
|
|
|
|
|
|
|
19 | #[deny(string_add_assign)]
|
|
|
|
| ^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: you assigned the result of adding something to this string. Consider using `String::push_str()` instead
|
|
|
|
--> $DIR/strings.rs:38:9
|
|
|
|
|
|
2017-02-08 13:58:07 +00:00
|
|
|
38 | x = x + ".";
|
2017-02-07 20:05:30 +00:00
|
|
|
| ^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
note: lint level defined here
|
|
|
|
--> $DIR/strings.rs:33:20
|
|
|
|
|
|
|
|
|
33 | #[deny(string_add, string_add_assign)]
|
|
|
|
| ^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: you added something to a string. Consider using `String::push_str()` instead
|
|
|
|
--> $DIR/strings.rs:42:13
|
|
|
|
|
|
2017-02-08 13:58:07 +00:00
|
|
|
42 | let z = y + "...";
|
2017-02-07 20:05:30 +00:00
|
|
|
| ^^^^^^^^^
|
|
|
|
|
|
|
|
|
note: lint level defined here
|
|
|
|
--> $DIR/strings.rs:33:8
|
|
|
|
|
|
|
|
|
33 | #[deny(string_add, string_add_assign)]
|
|
|
|
| ^^^^^^^^^^
|
|
|
|
|
|
|
|
error: calling `as_bytes()` on a string literal
|
|
|
|
--> $DIR/strings.rs:50:14
|
|
|
|
|
|
|
|
|
50 | let bs = "hello there".as_bytes();
|
2017-05-03 10:51:47 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using a byte string literal instead `b"hello there"`
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
|
|
|
note: lint level defined here
|
|
|
|
--> $DIR/strings.rs:48:8
|
|
|
|
|
|
|
|
|
48 | #[deny(string_lit_as_bytes)]
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
warning: manual implementation of an assign operation
|
|
|
|
--> $DIR/strings.rs:68:7
|
|
|
|
|
|
|
|
|
68 | ; x = x + 1;
|
2017-05-03 10:51:47 +00:00
|
|
|
| ^^^^^^^^^ help: replace it with `x += 1`
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
|
|
|
= note: #[warn(assign_op_pattern)] on by default
|
|
|
|
|
|
|
|
error: aborting due to 6 previous errors
|
|
|
|
|