We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0dd4b42 commit 28c4560Copy full SHA for 28c4560
src/rustc/middle/trans/shape.rs
@@ -49,12 +49,16 @@ fn mk_ctxt(llmod: ModuleRef) -> ctxt {
49
return {mut next_tag_id: 0u16, pad: 0u16, pad2: 0u32};
50
}
51
52
-fn add_u16(&dest: ~[u8], val: u16) {
53
- dest += ~[(val & 0xffu16) as u8, (val >> 8u16) as u8];
+/*
+Although these two functions are never called, they are here
54
+for a VERY GOOD REASON. See #3670
55
+*/
56
+fn add_u16(dest: &mut ~[u8], val: u16) {
57
+ *dest += ~[(val & 0xffu16) as u8, (val >> 8u16) as u8];
58
59
-fn add_substr(&dest: ~[u8], src: ~[u8]) {
60
+fn add_substr(dest: &mut ~[u8], src: ~[u8]) {
61
add_u16(dest, vec::len(src) as u16);
- dest += src;
62
+ *dest += src;
63
64
0 commit comments