]> git.proxmox.com Git - rustc.git/blobdiff - src/doc/nomicon/src/lifetimes.md
New upstream version 1.43.0+dfsg1
[rustc.git] / src / doc / nomicon / src / lifetimes.md
index bc917b14ddbd4a55435cd9ff0f22acc0eaf054a4..649cd770a292c77cdb936aa210b633b6570f71ca 100644 (file)
@@ -261,6 +261,8 @@ data.push(4);
 // Here, the destructor is run and therefore this'll fail to compile.
 ```
 
+One way to convince the compiler that `x` is no longer valid is by using `drop(x)` before `data.push(4)`.
+
 Furthermore, there might be multiple possible last uses of the borrow, for
 example in each branch of a condition.