-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of #3456 - samueltardieu:no-uninhabited-refs-deref, r=John…
…Titor Do not dereference uninhabited types refs in Clone implementations A reference to an uninhabited type should never be dereferenced: this is UB. `Copy` should not be implemented on such a type, and an upcoming Clippy lint (`uninhabited_reference`) may flag such dereferences as suspicious. Since those types are not structs, they do not need to get `Copy` and `Clone` implementations. A `missing!` macro limits code duplication.
- Loading branch information
Showing
4 changed files
with
20 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters