rust/src/test/ui/drop
Mazdak Farrokhzad aba84894d1
Rollup merge of #62330 - SimonSapin:no-drop-in-union-fields, r=RalfJung
Change untagged_unions to not allow union fields with drop

This is a rebase of #56440, massaged to solve merge conflicts and make the test suite pass.

Change untagged_unions to not allow union fields with drop

Union fields may now never have a type with attached destructor. This for example allows unions to use arbitrary field types only by wrapping them in `ManuallyDrop` (or similar).

The stable rule remains, that union fields must be `Copy`. We use the new rule for the `untagged_union` feature.

Tracking issue: https://github.com/rust-lang/rust/issues/55149
2019-10-21 22:00:45 +02:00
..
auxiliary tests: Move run-pass tests without naming conflicts to ui 2019-07-27 18:56:16 +03:00
drop-on-empty-block-exit.rs tests: Move run-pass tests without naming conflicts to ui 2019-07-27 18:56:16 +03:00
drop-on-ret.rs tests: Move run-pass tests without naming conflicts to ui 2019-07-27 18:56:16 +03:00
drop-struct-as-object.rs tests: Move run-pass tests without naming conflicts to ui 2019-07-27 18:56:16 +03:00
drop-trait-enum.rs tests: Move run-pass tests without naming conflicts to ui 2019-07-27 18:56:16 +03:00
drop-trait-generic.rs tests: Move run-pass tests without naming conflicts to ui 2019-07-27 18:56:16 +03:00
drop-trait.rs tests: Move run-pass tests without naming conflicts to ui 2019-07-27 18:56:16 +03:00
drop-uninhabited-enum.rs tests: Move run-pass tests without naming conflicts to ui 2019-07-27 18:56:16 +03:00
drop-with-type-ascription-1.rs tests: Move run-pass tests without naming conflicts to ui 2019-07-27 18:56:16 +03:00
drop-with-type-ascription-2.rs tests: Move run-pass tests without naming conflicts to ui 2019-07-27 18:56:16 +03:00
dropck-eyepatch-extern-crate.rs tests: Move run-pass tests without naming conflicts to ui 2019-07-27 18:56:16 +03:00
dropck-eyepatch-reorder.rs tests: Move run-pass tests without naming conflicts to ui 2019-07-27 18:56:16 +03:00
dropck-eyepatch.rs tests: Move run-pass tests without naming conflicts to ui 2019-07-27 18:56:16 +03:00
dropck_legal_cycles.rs use println!() 2019-09-15 23:15:06 +08:00
dynamic-drop-async.rs Upgrade Emscripten targets to use upstream LLVM backend 2019-10-16 17:06:48 -07:00
dynamic-drop.rs Rollup merge of #62330 - SimonSapin:no-drop-in-union-fields, r=RalfJung 2019-10-21 22:00:45 +02:00
no-drop-flag-size.rs tests: Move run-pass tests without naming conflicts to ui 2019-07-27 18:56:16 +03:00
nondrop-cycle.rs tests: Move run-pass tests without naming conflicts to ui 2019-07-27 18:56:16 +03:00