rustc: Run destructors when dest=Ignore#13390
Conversation
There was a problem hiding this comment.
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 |
|
You may be interested in these tests: |
|
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