mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 15:23:46 +00:00
add a comment about the drop order for EncodedMetadata
This commit is contained in:
parent
03de5c4a14
commit
ec64b4c90e
@ -2144,6 +2144,7 @@ fn prefetch_mir(tcx: TyCtxt<'_>) {
|
|||||||
// generated regardless of trailing bytes that end up in it.
|
// generated regardless of trailing bytes that end up in it.
|
||||||
|
|
||||||
pub struct EncodedMetadata {
|
pub struct EncodedMetadata {
|
||||||
|
// The declaration order matters because `mmap` should be dropped before `_temp_dir`.
|
||||||
mmap: Option<Mmap>,
|
mmap: Option<Mmap>,
|
||||||
// We need to carry MaybeTempDir to avoid deleting the temporary
|
// We need to carry MaybeTempDir to avoid deleting the temporary
|
||||||
// directory while accessing the Mmap.
|
// directory while accessing the Mmap.
|
||||||
|
Loading…
Reference in New Issue
Block a user