Skip to content

Commit a87f9a3

Browse files
author
Jeremy Fitzhardinge
committed
Add note on size parameter and v0 mangling requirement
1 parent d800196 commit a87f9a3

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/doc/unstable-book/src/compiler-flags/annotate-moves.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,14 @@ Stack traces will show the operations:
6262
2: my_function
6363
```
6464

65+
The `compiler_move` and `compiler_copy` functions have two generic parameters:
66+
the type being moved/copied and its size in bytes. The size is identical to
67+
`size_of::<T>()`, and is present just so that it's easy to immediately tell how
68+
large the copy is.
69+
70+
Note that this requires v0 mangling to be properly encoded; legacy mangling does
71+
not substitute these with a specific type and size.
72+
6573
## Example
6674

6775
```rust

0 commit comments

Comments
 (0)