summary refs log tree commit diff
path: root/src/test/ui/span/issue-39018.stderr
blob: 2ce5b0c11712ab720545842c6d610bae1cffb89e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
error[E0369]: binary operation `+` cannot be applied to type `&str`
  --> $DIR/issue-39018.rs:2:22
   |
LL |     let x = "Hello " + "World!";
   |             -------- ^ -------- &str
   |             |        |
   |             |        `+` cannot be used to concatenate two `&str` strings
   |             &str
   |
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
   |
LL |     let x = "Hello ".to_owned() + "World!";
   |             ^^^^^^^^^^^^^^^^^^^

error[E0369]: binary operation `+` cannot be applied to type `World`
  --> $DIR/issue-39018.rs:8:26
   |
LL |     let y = World::Hello + World::Goodbye;
   |             ------------ ^ -------------- World
   |             |
   |             World
   |
   = note: an implementation of `std::ops::Add` might be missing for `World`

error[E0369]: binary operation `+` cannot be applied to type `&str`
  --> $DIR/issue-39018.rs:11:22
   |
LL |     let x = "Hello " + "World!".to_owned();
   |             -------- ^ ------------------- std::string::String
   |             |        |
   |             |        `+` cannot be used to concatenate a `&str` with a `String`
   |             &str
   |
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
   |
LL |     let x = "Hello ".to_owned() + &"World!".to_owned();
   |             ^^^^^^^^^^^^^^^^^^^   ^^^^^^^^^^^^^^^^^^^^

error[E0369]: binary operation `+` cannot be applied to type `&std::string::String`
  --> $DIR/issue-39018.rs:26:16
   |
LL |     let _ = &a + &b;
   |             -- ^ -- &std::string::String
   |             |  |
   |             |  `+` cannot be used to concatenate two `&str` strings
   |             &std::string::String
   |
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
   |
LL |     let _ = a + &b;
   |             ^

error[E0369]: binary operation `+` cannot be applied to type `&std::string::String`
  --> $DIR/issue-39018.rs:27:16
   |
LL |     let _ = &a + b;
   |             -- ^ - std::string::String
   |             |  |
   |             |  `+` cannot be used to concatenate a `&str` with a `String`
   |             &std::string::String
   |
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
   |
LL |     let _ = a + &b;
   |             ^   ^^

error[E0308]: mismatched types
  --> $DIR/issue-39018.rs:29:17
   |
LL |     let _ = a + b;
   |                 ^
   |                 |
   |                 expected &str, found struct `std::string::String`
   |                 help: consider borrowing here: `&b`
   |
   = note: expected type `&str`
              found type `std::string::String`

error[E0369]: binary operation `+` cannot be applied to type `&std::string::String`
  --> $DIR/issue-39018.rs:30:15
   |
LL |     let _ = e + b;
   |             - ^ - std::string::String
   |             | |
   |             | `+` cannot be used to concatenate a `&str` with a `String`
   |             &std::string::String
   |
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
   |
LL |     let _ = e.to_owned() + &b;
   |             ^^^^^^^^^^^^   ^^

error[E0369]: binary operation `+` cannot be applied to type `&std::string::String`
  --> $DIR/issue-39018.rs:31:15
   |
LL |     let _ = e + &b;
   |             - ^ -- &std::string::String
   |             | |
   |             | `+` cannot be used to concatenate two `&str` strings
   |             &std::string::String
   |
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
   |
LL |     let _ = e.to_owned() + &b;
   |             ^^^^^^^^^^^^

error[E0369]: binary operation `+` cannot be applied to type `&std::string::String`
  --> $DIR/issue-39018.rs:32:15
   |
LL |     let _ = e + d;
   |             - ^ - &str
   |             | |
   |             | `+` cannot be used to concatenate two `&str` strings
   |             &std::string::String
   |
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
   |
LL |     let _ = e.to_owned() + d;
   |             ^^^^^^^^^^^^

error[E0369]: binary operation `+` cannot be applied to type `&std::string::String`
  --> $DIR/issue-39018.rs:33:15
   |
LL |     let _ = e + &d;
   |             - ^ -- &&str
   |             | |
   |             | `+` cannot be used to concatenate two `&str` strings
   |             &std::string::String
   |
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
   |
LL |     let _ = e.to_owned() + &d;
   |             ^^^^^^^^^^^^

error[E0369]: binary operation `+` cannot be applied to type `&&str`
  --> $DIR/issue-39018.rs:34:16
   |
LL |     let _ = &c + &d;
   |             -- ^ -- &&str
   |             |
   |             &&str
   |
   = note: an implementation of `std::ops::Add` might be missing for `&&str`

error[E0369]: binary operation `+` cannot be applied to type `&&str`
  --> $DIR/issue-39018.rs:35:16
   |
LL |     let _ = &c + d;
   |             -- ^ - &str
   |             |
   |             &&str
   |
   = note: an implementation of `std::ops::Add` might be missing for `&&str`

error[E0369]: binary operation `+` cannot be applied to type `&str`
  --> $DIR/issue-39018.rs:36:15
   |
LL |     let _ = c + &d;
   |             - ^ -- &&str
   |             | |
   |             | `+` cannot be used to concatenate two `&str` strings
   |             &str
   |
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
   |
LL |     let _ = c.to_owned() + &d;
   |             ^^^^^^^^^^^^

error[E0369]: binary operation `+` cannot be applied to type `&str`
  --> $DIR/issue-39018.rs:37:15
   |
LL |     let _ = c + d;
   |             - ^ - &str
   |             | |
   |             | `+` cannot be used to concatenate two `&str` strings
   |             &str
   |
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
   |
LL |     let _ = c.to_owned() + d;
   |             ^^^^^^^^^^^^

error: aborting due to 14 previous errors

Some errors have detailed explanations: E0308, E0369.
For more information about an error, try `rustc --explain E0308`.