Closed
Description
The following code produces an internal compiler error:
fn main() {
let mut mystr = ~"";
mystr += ~"abc";
println(mystr);
}
Compiler output:
$ rustc.exe main.rs
main.rs:7:5: 7:20 error: binary operation + cannot be applied to type `~str`
main.rs:7 mystr += ~"abc";
^~~~~~~~~~~~~~~
error: internal compiler error: no type for node 48: expr "abc" (id=48) in fcx 0
x65041c0
This message reflects a bug in the Rust compiler.
We would appreciate a bug report: https://github.com/mozilla/rust/wiki/HOWTO-submit-a-Rust-bug-report
task 'rustc' failed at 'explicit failure', C:\Rust\rust\src\libsyntax\diagnostic.rs:75
task '<main>' failed at 'explicit failure', C:\Rust\rust\src\librustc\lib.rs:440
Metadata
Metadata
Assignees
Labels
No labels