File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ fn foo() {
26
26
let _ = & a + & b; //~ ERROR binary operation
27
27
let _ = & a + b; //~ ERROR binary operation
28
28
let _ = a + & b; // ok
29
- let _ = a + b; //~ ERROR mismatched types
29
+ let _ = a + b; //~ ERROR E0277
30
30
let _ = e + b; //~ ERROR binary operation
31
31
let _ = e + & b; //~ ERROR binary operation
32
32
let _ = e + d; //~ ERROR binary operation
Original file line number Diff line number Diff line change @@ -64,14 +64,20 @@ help: `to_owned()` can be used to create an owned `String` from a string referen
64
64
LL | let _ = a + &b;
65
65
| ^ ^^
66
66
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
69
69
|
70
70
LL | let _ = a + b;
71
+ <<<<<<< HEAD
71
72
| ^
72
73
| |
73
74
| expected `&str`, found struct `std::string::String`
74
75
| 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.
75
81
76
82
error[E0369]: binary operation `+` cannot be applied to type `&std::string::String`
77
83
--> $DIR/issue-39018.rs:30:15
You can’t perform that action at this time.
0 commit comments