Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version 0.1.1 #2

Merged
merged 5 commits into from
Dec 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ name = "maybe-dangling"
authors = [
"Daniel Henry-Mantilla <[email protected]>",
]
version = "0.1.0" # Keep in sync
version = "0.1.1" # Keep in sync
edition = "2021"
rust-version = "1.65.0"

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@ This crates offers two types, `ManuallyDrop<T>`, and `MaybeDangling<T>`, which d

## References

- ### The RFC that shall eventually and ultimately supersede this very crate: <https://github.com/rust-lang/rfcs/pull/3336>
- **The RFC that shall eventually and ultimately supersede this very crate: <https://github.com/rust-lang/rfcs/pull/3336>**

- The `miri` PR implementing the check against this: <https://github.com/rust-lang/miri/pull/2985>

- The soundness problem of `::ouroboros` stemming from not using this: <https://github.com/joshua-maros/ouroboros/issues/88>

- The soundness problem of `::yoke` stemming from not using this: <https://github.com/unicode-org/icu4x/issues/3696>

- [An URLO thread on the topic, and my post exposing the intention to write this very crate](https://users.rust-lang.org/t/unsafe-code-review-semi-owning-weak-rwlock-t-guard/95706/15?u=yandros)
- [An URLO thread on the topic, and a post exposing the intention to write this very crate](https://users.rust-lang.org/t/unsafe-code-review-semi-owning-weak-rwlock-t-guard/95706/15?u=yandros)
7 changes: 1 addition & 6 deletions src/manually_drop.rs
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ impl<T> DerefMut for ManuallyDrop<T> {
}

impl<T: Default> Default for ManuallyDrop<T> {
/// See [`::core::mem::ManuallyDrop::default()`] for more info.
#[inline]
fn default() -> Self {
Self::new(T::default())
Expand All @@ -135,34 +136,28 @@ impl<T: Clone> Clone for ManuallyDrop<T> {
}

JustDerefTM! {
/// See [`::core::mem::ManuallyDrop::clone_from()`] for more info.
fn clone_from(self: &mut Self, source: &Self);
}
}

JustDerefTM! {
impl<T: Debug> Debug for ManuallyDrop<T> {
/// See [`::core::mem::ManuallyDrop::fmt()`] for more info.
fn fmt(self: &Self, f: &mut fmt::Formatter<'_>) -> fmt::Result;
}

impl<T: Hash> Hash for ManuallyDrop<T> {
/// See [`::core::mem::ManuallyDrop::hash()`] for more info.
fn hash<__H: hash::Hasher>(self: &Self, state: &mut __H);
}

impl<T: Ord> Ord for ManuallyDrop<T> {
/// See [`::core::mem::ManuallyDrop::cmp()`] for more info.
fn cmp(self: &Self, other: &Self) -> Ordering;
}

impl<T: PartialOrd> PartialOrd for ManuallyDrop<T> {
/// See [`::core::mem::ManuallyDrop::partial_cmp()`] for more info.
fn partial_cmp(self: &Self, other: &Self) -> Option<Ordering>;
}

impl<T: PartialEq> PartialEq for ManuallyDrop<T> {
/// See [`::core::mem::ManuallyDrop::eq()`] for more info.
fn eq(self: &Self, other: &Self) -> bool;
}

Expand Down
Loading