Skip to content

Commit

Permalink
Merge pull request #1243 from pwnorbitals/patch-1
Browse files Browse the repository at this point in the history
Remove outdated warning
  • Loading branch information
ehuss authored Jul 24, 2022
2 parents a92be0f + 1504977 commit d43000c
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions src/expressions/array-expr.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,6 @@ When the repeat operand is a constant item, it is evaluated the length operand's
If that value is `0`, then the constant item is not evaluated at all.
For expressions that are not a constant item, it is evaluated exactly once, and then the result is copied the length operand's value times.

<div class="warning">

Warning: In the case where the length operand is 0, and the repeat operand is a non-constant item, there is currently a bug in `rustc` where the value `a` is evaluated but not dropped, thus causing a leak.
See [issue #74836](https://github.com/rust-lang/rust/issues/74836).

</div>

```rust
[1, 2, 3, 4];
["a", "b", "c", "d"];
Expand Down

0 comments on commit d43000c

Please sign in to comment.