Skip to content

Commit f781398

Browse files
committed
Rebase attempt to resolve merge conflict
1 parent 3b2f9fb commit f781398

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

src/test/ui/span/issue-39018.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ fn foo() {
2626
let _ = &a + &b; //~ ERROR binary operation
2727
let _ = &a + b; //~ ERROR binary operation
2828
let _ = a + &b; // ok
29-
let _ = a + b; //~ ERROR mismatched types
29+
let _ = a + b; //~ ERROR E0277
3030
let _ = e + b; //~ ERROR binary operation
3131
let _ = e + &b; //~ ERROR binary operation
3232
let _ = e + d; //~ ERROR binary operation

src/test/ui/span/issue-39018.stderr

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,14 +64,20 @@ help: `to_owned()` can be used to create an owned `String` from a string referen
6464
LL | let _ = a + &b;
6565
| ^ ^^
6666

67-
error[E0308]: mismatched types
68-
--> $DIR/issue-39018.rs:29:17
67+
error[E0277]: cannot add `std::string::String` to `std::string::String`
68+
--> $DIR/issue-39018.rs:29:15
6969
|
7070
LL | let _ = a + b;
71+
<<<<<<< HEAD
7172
| ^
7273
| |
7374
| expected `&str`, found struct `std::string::String`
7475
| help: consider borrowing here: `&b`
76+
=======
77+
| ^ no implementation for `std::string::String + std::string::String`
78+
|
79+
= help: the trait `std::ops::Add` is not implemented for `std::string::String`
80+
>>>>>>> e6695f0a886... Edited src/test/ui/span/issue-39018.rs with the error code/string that compiler now produces.
7581

7682
error[E0369]: binary operation `+` cannot be applied to type `&std::string::String`
7783
--> $DIR/issue-39018.rs:30:15

0 commit comments

Comments
 (0)