You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
alexcrichton opened this issue
Sep 17, 2013
· 2 comments
· Fixed by #11606
Labels
A-codegenArea: Code generationI-crashIssue: The compiler crashes (SIGSEGV, SIGABRT, etc). Use I-ICE instead when the compiler panics.P-mediumMedium priority
structA<'self>{a:&'self[~str],b:Option<&'self[~str]>,}fnmain(){let b = Some(&[~"foo"]);let a = A{a:[~"test"],b: b,};assert_eq!(a.b.get_ref()[0].as_slice(),"foo");}
$ rust run bar.rs
warning: no debug symbols in executable (-arch x86_64)
task <unnamed> failed at 'assertion failed: `(left == right) && (right == left)` (left: `"test"`, right: `"foo"`)', bar.rs:12
Somehow the string ~"foo" is getting overwritten with ~"test"...
The text was updated successfully, but these errors were encountered:
A-codegenArea: Code generationI-crashIssue: The compiler crashes (SIGSEGV, SIGABRT, etc). Use I-ICE instead when the compiler panics.P-mediumMedium priority
This code produces some disturbing results:
Somehow the string
~"foo"
is getting overwritten with~"test"
...The text was updated successfully, but these errors were encountered: