diff options
| author | Ralf Jung <post@ralfj.de> | 2019-10-19 10:14:10 +0200 |
|---|---|---|
| committer | Ralf Jung <post@ralfj.de> | 2019-10-19 10:14:10 +0200 |
| commit | 696cba6e25fc7a8ee90e4db00f4df89dfe963d8e (patch) | |
| tree | f139e432de9637973399fd345dfb23cc20f99a6c /src/liballoc | |
| parent | 868a77263a6e140401946b4a0fca72b41315c3df (diff) | |
| download | rust-696cba6e25fc7a8ee90e4db00f4df89dfe963d8e.tar.gz rust-696cba6e25fc7a8ee90e4db00f4df89dfe963d8e.zip | |
the exampleis about drop, not (de)allocation
Diffstat (limited to 'src/liballoc')
| -rw-r--r-- | src/liballoc/rc.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/liballoc/rc.rs b/src/liballoc/rc.rs index 1cab8026514..205f0d7b408 100644 --- a/src/liballoc/rc.rs +++ b/src/liballoc/rc.rs @@ -112,9 +112,9 @@ //! //! // Despite dropping `gadget_owner`, we're still able to print out the name //! // of the `Owner` of the `Gadget`s. This is because we've only dropped a -//! // single `Rc<Owner>`, not the `Owner` allocation it points to. As long as there are +//! // single `Rc<Owner>`, not the `Owner` it points to. As long as there are //! // other `Rc<Owner>` pointing at the same `Owner` allocation, it will remain -//! // allocated. The field projection `gadget1.owner.name` works because +//! // live. The field projection `gadget1.owner.name` works because //! // `Rc<Owner>` automatically dereferences to `Owner`. //! println!("Gadget {} owned by {}", gadget1.id, gadget1.owner.name); //! println!("Gadget {} owned by {}", gadget2.id, gadget2.owner.name); |
