1 error[E0369]: binary operation `+` cannot be applied to type `&str`
2 --> $DIR/issue-39018.rs:2:22
4 LL | let x = "Hello " + "World!";
5 | -------- ^ -------- &str
7 | | `+` cannot be used to concatenate two `&str` strings
10 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
12 LL | let x = "Hello ".to_owned() + "World!";
15 error[E0369]: binary operation `+` cannot be applied to type `World`
16 --> $DIR/issue-39018.rs:8:26
18 LL | let y = World::Hello + World::Goodbye;
19 | ------------ ^ -------------- World
23 = note: an implementation of `std::ops::Add` might be missing for `World`
25 error[E0369]: binary operation `+` cannot be applied to type `&str`
26 --> $DIR/issue-39018.rs:11:22
28 LL | let x = "Hello " + "World!".to_owned();
29 | -------- ^ ------------------- std::string::String
31 | | `+` cannot be used to concatenate a `&str` with a `String`
34 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
36 LL | let x = "Hello ".to_owned() + &"World!".to_owned();
37 | ^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^
39 error[E0369]: binary operation `+` cannot be applied to type `&std::string::String`
40 --> $DIR/issue-39018.rs:26:16
43 | -- ^ -- &std::string::String
45 | | `+` cannot be used to concatenate two `&str` strings
46 | &std::string::String
48 help: 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
53 error[E0369]: binary operation `+` cannot be applied to type `&std::string::String`
54 --> $DIR/issue-39018.rs:27:16
57 | -- ^ - std::string::String
59 | | `+` cannot be used to concatenate a `&str` with a `String`
60 | &std::string::String
62 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
67 error[E0308]: mismatched types
68 --> $DIR/issue-39018.rs:29:17
73 | expected &str, found struct `std::string::String`
74 | help: consider borrowing here: `&b`
76 error[E0369]: binary operation `+` cannot be applied to type `&std::string::String`
77 --> $DIR/issue-39018.rs:30:15
80 | - ^ - std::string::String
82 | | `+` cannot be used to concatenate a `&str` with a `String`
83 | &std::string::String
85 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
87 LL | let _ = e.to_owned() + &b;
90 error[E0369]: binary operation `+` cannot be applied to type `&std::string::String`
91 --> $DIR/issue-39018.rs:31:15
94 | - ^ -- &std::string::String
96 | | `+` cannot be used to concatenate two `&str` strings
97 | &std::string::String
99 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
101 LL | let _ = e.to_owned() + &b;
104 error[E0369]: binary operation `+` cannot be applied to type `&std::string::String`
105 --> $DIR/issue-39018.rs:32:15
110 | | `+` cannot be used to concatenate two `&str` strings
111 | &std::string::String
113 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
115 LL | let _ = e.to_owned() + d;
118 error[E0369]: binary operation `+` cannot be applied to type `&std::string::String`
119 --> $DIR/issue-39018.rs:33:15
124 | | `+` cannot be used to concatenate two `&str` strings
125 | &std::string::String
127 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
129 LL | let _ = e.to_owned() + &d;
132 error[E0369]: binary operation `+` cannot be applied to type `&&str`
133 --> $DIR/issue-39018.rs:34:16
135 LL | let _ = &c + &d;
140 = note: an implementation of `std::ops::Add` might be missing for `&&str`
142 error[E0369]: binary operation `+` cannot be applied to type `&&str`
143 --> $DIR/issue-39018.rs:35:16
150 = note: an implementation of `std::ops::Add` might be missing for `&&str`
152 error[E0369]: binary operation `+` cannot be applied to type `&str`
153 --> $DIR/issue-39018.rs:36:15
158 | | `+` cannot be used to concatenate two `&str` strings
161 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
163 LL | let _ = c.to_owned() + &d;
166 error[E0369]: binary operation `+` cannot be applied to type `&str`
167 --> $DIR/issue-39018.rs:37:15
172 | | `+` cannot be used to concatenate two `&str` strings
175 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
177 LL | let _ = c.to_owned() + d;
180 error: aborting due to 14 previous errors
182 Some errors have detailed explanations: E0308, E0369.
183 For more information about an error, try `rustc --explain E0308`.