Skip to content

Commit fcbf012

Browse files
committed
auto merge of #16576 : steveklabnik/rust/static_analysis_gate, r=pcwalton
This has certain implications that are wrong. Fixes #16299.
2 parents 7074592 + 88e62a9 commit fcbf012

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/doc/guide.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3669,10 +3669,9 @@ manually free this allocation! If we write
36693669
```
36703670

36713671
then Rust will automatically free `x` at the end of the block. This isn't
3672-
because Rust has a garbage collector -- it doesn't. Instead, Rust uses static
3673-
analysis to determine the *lifetime* of `x`, and then generates code to free it
3674-
once it's sure the `x` won't be used again. This Rust code will do the same
3675-
thing as the following C code:
3672+
because Rust has a garbage collector -- it doesn't. Instead, when `x` goes out
3673+
of scope, Rust `free`s `x`. This Rust code will do the same thing as the
3674+
following C code:
36763675

36773676
```{c,ignore}
36783677
{

0 commit comments

Comments
 (0)