os-rust/src/test/ui/issue-47380.stderr

14 lines
782 B
Text
Raw Normal View History

2018-01-17 01:31:21 +05:30
error[E0369]: binary operation `+` cannot be applied to type `&str`
2018-01-17 02:07:07 +05:30
--> $DIR/issue-47380.rs:12:33
2018-01-17 01:31:21 +05:30
|
2018-01-17 02:07:07 +05:30
12 | println!("🦀🦀🦀🦀🦀"); let _a = b + ", World!";
2018-01-17 01:31:21 +05:30
| ^^^^^^^^^^^^^^ `+` can't be used to concatenate two `&str` strings
help: `to_owned()` can be used to create an owned `String` from a string reference. String concatenation appends the string on the right to the string on the left and may require reallocation. This requires ownership of the string on the left
|
2018-01-17 02:07:07 +05:30
12 | println!("🦀🦀🦀🦀🦀"); let _a = b.to_owned() + ", World!";
2018-01-17 01:31:21 +05:30
| ^^^^^^^^^^^^
error: aborting due to previous error
2018-02-19 21:40:25 +01:00
If you want more information on this error, try using "rustc --explain E0369"