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.
2 parents 37b6170 + 0fd7306 commit 98d750aCopy full SHA for 98d750a
src/lifetimes.md
@@ -261,6 +261,8 @@ data.push(4);
261
// Here, the destructor is run and therefore this'll fail to compile.
262
```
263
264
+One way to convince the compiler that `x` is no longer valid is by using `drop(x)` before `data.push(4)`.
265
+
266
Furthermore, there might be multiple possible last uses of the borrow, for
267
example in each branch of a condition.
268
0 commit comments