Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Destructors aren't run properly for vector slice literals #2705

Closed
msullivan opened this issue Jun 21, 2012 · 0 comments
Closed

Destructors aren't run properly for vector slice literals #2705

msullivan opened this issue Jun 21, 2012 · 0 comments
Labels
A-codegen Area: Code generation

Comments

@msullivan
Copy link
Contributor

This code will leak:

fn main() {
    let _l = [@1]/&;
}
@ghost ghost assigned msullivan Jun 21, 2012
@msullivan msullivan removed their assignment Jun 16, 2014
celinval pushed a commit to celinval/rust-dev that referenced this issue Jun 4, 2024
Concrete playback seeks to generate unit tests in the original source
file. An intermediate temporary file is used to reduce the risk of
corrupting original source files. Once the temporary file has been
completely written to, it is to be atomically moved to replace the
source file. This can only be done on the same file system.

We now create the temporary file in the same source directory as the
original source file to ensure we are on the same file system. The
implementation uses NamedTempFile from the tempfile crate, which renders
our own tempfile implementation redundant.

Tested on Ubuntu 20.04 with /tmp on a different partition (where our
regression tests would previously fail).

Resolves: rust-lang#2705
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-codegen Area: Code generation
Projects
None yet
Development

No branches or pull requests

1 participant