rust/src/test/ui/union
bors 99baddb57c Auto merge of #78068 - RalfJung:union-safe-assign, r=nikomatsakis
consider assignments of union field of ManuallyDrop type safe

Assigning to `Copy` union fields is safe because that assignment will never drop anything. However, with https://github.com/rust-lang/rust/pull/77547, unions may also have `ManuallyDrop` fields, and their assignments are currently still unsafe. That seems unnecessary though, as assigning `ManuallyDrop` does not drop anything either, and is thus safe even for union fields.

I assume this will at least require FCP.
2020-12-15 11:31:03 +00:00
..
auxiliary
issue-41073.rs
issue-41073.stderr
union-align.rs stabilize union with 'ManuallyDrop' fields and 'impl Drop for Union' 2020-10-16 11:33:33 +02:00
union-backcomp.rs
union-basic.rs
union-borrow-move-parent-sibling.rs
union-borrow-move-parent-sibling.stderr
union-const-codegen.rs
union-const-eval-field.rs
union-const-eval.rs
union-const-pat.rs Deduplicate errors in const to pat conversion 2020-09-23 17:03:31 +02:00
union-const-pat.stderr Deduplicate errors in const to pat conversion 2020-09-23 17:03:31 +02:00
union-copy.rs stabilize union with 'ManuallyDrop' fields and 'impl Drop for Union' 2020-10-16 11:33:33 +02:00
union-copy.stderr stabilize union with 'ManuallyDrop' fields and 'impl Drop for Union' 2020-10-16 11:33:33 +02:00
union-custom-drop.rs
union-custom-drop.stderr
union-deref.rs test more ways of mutably accessing a place 2020-08-31 10:14:32 +02:00
union-deref.stderr rustc_parse: More precise spans for tuple.0.0 2020-10-11 02:33:49 +03:00
union-derive-clone.rs stabilize union with 'ManuallyDrop' fields and 'impl Drop for Union' 2020-10-16 11:33:33 +02:00
union-derive-clone.stderr stabilize union with 'ManuallyDrop' fields and 'impl Drop for Union' 2020-10-16 11:33:33 +02:00
union-derive-eq.rs stabilize union with 'ManuallyDrop' fields and 'impl Drop for Union' 2020-10-16 11:33:33 +02:00
union-derive-eq.stderr stabilize union with 'ManuallyDrop' fields and 'impl Drop for Union' 2020-10-16 11:33:33 +02:00
union-derive-rpass.rs stabilize union with 'ManuallyDrop' fields and 'impl Drop for Union' 2020-10-16 11:33:33 +02:00
union-derive.rs
union-derive.stderr
union-drop-assign.rs stabilize union with 'ManuallyDrop' fields and 'impl Drop for Union' 2020-10-16 11:33:33 +02:00
union-drop.rs stabilize union with 'ManuallyDrop' fields and 'impl Drop for Union' 2020-10-16 11:33:33 +02:00
union-empty.rs
union-empty.stderr
union-fields-1.rs
union-fields-1.stderr
union-fields-2.rs
union-fields-2.stderr Detect tuple struct incorrectly used as struct pat 2020-07-12 10:34:48 -07:00
union-generic-rpass.rs stabilize union with 'ManuallyDrop' fields and 'impl Drop for Union' 2020-10-16 11:33:33 +02:00
union-generic.rs pretty: trim paths of unique symbols 2020-09-02 22:26:37 +03:00
union-generic.stderr pretty: trim paths of unique symbols 2020-09-02 22:26:37 +03:00
union-inherent-method.rs
union-lint-dead-code.rs
union-lint-dead-code.stderr
union-macro.rs
union-manuallydrop-rpass.rs stabilize union with 'ManuallyDrop' fields and 'impl Drop for Union' 2020-10-16 11:33:33 +02:00
union-move.rs please tidy 2020-09-13 16:13:20 +02:00
union-move.stderr rebase fallout 2020-09-13 18:15:19 +02:00
union-nodrop.rs stabilize union with 'ManuallyDrop' fields and 'impl Drop for Union' 2020-10-16 11:33:33 +02:00
union-nonrepresentable.rs
union-nonrepresentable.stderr
union-nonzero.rs
union-overwrite.rs stabilize union with 'ManuallyDrop' fields and 'impl Drop for Union' 2020-10-16 11:33:33 +02:00
union-packed.rs stabilize union with 'ManuallyDrop' fields and 'impl Drop for Union' 2020-10-16 11:33:33 +02:00
union-pat-refutability.rs
union-repr-c.rs
union-repr-c.stderr
union-sized-field.rs
union-sized-field.stderr pretty: trim paths of unique symbols 2020-09-02 22:26:37 +03:00
union-suggest-field.rs
union-suggest-field.stderr
union-trait-impl.rs
union-transmute.rs Update tests to remove old numeric constants 2020-11-29 00:55:55 -05:00
union-unsafe.rs needs -> might need 2020-11-20 10:58:31 +01:00
union-unsafe.stderr needs -> might need 2020-11-20 10:58:31 +01:00
union-unsized.rs
union-unsized.stderr pretty: trim paths of unique symbols 2020-09-02 22:26:37 +03:00
union-with-drop-fields.rs
union-with-drop-fields.stderr