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 bf4e4e3 commit b4301e0Copy full SHA for b4301e0
src/references/slices.md
@@ -42,4 +42,13 @@ fn main() {
42
- Slices always borrow from another object. In this example, `a` has to remain
43
'alive' (in scope) for at least as long as our slice.
44
45
+- You can't "grow" a slice once it's created:
46
+ - You can't append elements of the slice, since it doesn't own the backing
47
+ buffer.
48
+ - You can't grow a slice to point to a larger section of the backing buffer.
49
+ The slice loses information about the underlying buffer and so you can't
50
+ know how larger the slice can be grown.
51
+ - To get a larger slice you have to back to the original buffer and create a
52
+ larger slice from there.
53
+
54
</details>
0 commit comments