diff options
author | René Kijewski <rene.kijewski@fu-berlin.de> | 2023-08-01 02:21:59 +0200 |
---|---|---|
committer | Dirkjan Ochtman <dirkjan@ochtman.nl> | 2023-08-01 10:51:57 +0200 |
commit | b3843d90a85d84e44ccd6cb188a5aa375df84104 (patch) | |
tree | 49589fcad4f22c9ea623e8c52e463af749079019 /askama_escape/benches | |
parent | 7c3a85de4fe8851bbff7c477237ed88954b9f9c5 (diff) | |
download | askama-b3843d90a85d84e44ccd6cb188a5aa375df84104.tar.gz askama-b3843d90a85d84e44ccd6cb188a5aa375df84104.tar.bz2 askama-b3843d90a85d84e44ccd6cb188a5aa375df84104.zip |
parser: ensure correct drop order for `Parsed`
According to [RFC 1857] the fields of a struct are dropped in the same
order as they are declared. For `struct S { a: A, b: B }` field `a` is
dropped before field `b`.
Our struct `Parsed` is self referencial. Its field `ast` depends on
`source`, so `source` must outlife `ast`. This PR changes the order of
the fields to reflect this requirement. In practice it should not
matter, because we know that the variant of `Node` won't access the
string data during their `Drop`, but better safe than sorry - maybe
`Node` changes in the future.
[RFC 1857]: https://rust-lang.github.io/rfcs/1857-stabilize-drop-order.html
Diffstat (limited to 'askama_escape/benches')
0 files changed, 0 insertions, 0 deletions