-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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
rustc: Run destructors when dest=Ignore #13390
Conversation
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your | ||
// option. This file may not be copied, modified, or distributed | ||
// except according to those terms. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mind adding a small description about what's being tested? (for future readers of this test)
If this does indeed turn out to be the right solution, I'm curious if this closes #10488? I've lost track of the discussion there, but this seems applicable to that. |
Can we get a test that ensures that |
Ah hah, ok then, sounds good. |
Is this a typo? It seems that |
Previously, if statements of the form "Foo;" or "let _ = Foo;" were encountered where Foo had a destructor, the destructors were not run. This changes the relevant locations in trans to check for ty::type_needs_drop and invokes trans_to_lvalue instead of trans_into. Closes rust-lang#4734 Closes rust-lang#6892
@huonw, indeed! Thanks for pointing that out. |
Cast runnableEnv items to string fix rust-lang#13390 An alternative approach could be raising an error if there is non string values.
…rednet Make it clearer that the suggestion is an alternative one `needless_pass_by_value` sometimes suggest marking the concerned type as `Copy`. Adding a `or` before this suggestion makes it clearer that this is not the second part of the original suggestion, but an alternative one. Inspired by a misunderstanding in rust-lang#13321 changelog: none
Previously, if statements of the form "Foo;" or "let _ = Foo;" were encountered
where Foo had a destructor, the destructors were not run. This changes
the relevant locations in trans to check for ty::type_needs_drop and invokes
trans_to_lvalue instead of trans_into.
Closes #4734
Closes #6892