Skip to content

Commit 1804af0

Browse files
committed
Remove Message impl for ManuallyDrop
This was added in error, really, there is no case where we would want `T: Message` to include `ManuallyDrop<T>` - that would simply only serve to confuse the user, as they might think the `dealloc` method wouldn't be called for `Id<ManuallyDrop<MyObject>, O>`, which it definitely would!
1 parent ee5948e commit 1804af0

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

objc2/CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
6666
* Properly sealed the `MessageArguments` trait (it already had a hidden
6767
method, so this is not really a breaking change).
6868

69+
### Removed
70+
* **BREAKING**: `ManuallyDrop` no longer implements `Message` directly.
71+
6972

7073
## 0.3.0-alpha.6 - 2022-01-03
7174

objc2/src/message/mod.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,6 @@ use self::verify::{verify_message_signature, VerificationError};
6161
/// [`objc_msgSend`]: https://developer.apple.com/documentation/objectivec/1456712-objc_msgsend
6262
pub unsafe trait Message: RefEncode {}
6363

64-
// SAFETY: `ManuallyDrop` is `repr(transparent)`.
65-
unsafe impl<T: Message + ?Sized> Message for ManuallyDrop<T> {}
66-
6764
unsafe impl Message for Object {}
6865

6966
// TODO: Make this fully private

0 commit comments

Comments
 (0)