improve error message shown for unsafe operations Add a short explanation saying why undefined behavior could arise. In particular, the error many people got for "creating a pointer to a packed field requires unsafe block" was not worded great -- it lead to people just adding the unsafe block without considering if what they are doing follows the rules. I am not sure if a "note" is the right thing, but that was the easiest thing to add... Inspired by @gnzlbg at https://github.com/rust-lang/rust/issues/46043#issuecomment-381544673 |
||
|---|---|---|
| .. | ||
| union-borrow-move-parent-sibling.rs | ||
| union-const-pat.rs | ||
| union-copy.rs | ||
| union-derive-clone.rs | ||
| union-derive.rs | ||
| union-empty.rs | ||
| union-generic.rs | ||
| union-lint-dead-code.rs | ||
| union-nonrepresentable.rs | ||
| union-repr-c.rs | ||
| union-unsafe.rs | ||
| union-unsized.rs | ||
| union-with-drop-fields-lint.rs | ||