[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CANiq72=cT_f90GJkaRq_rBKYMnruSf87UVKSX0TBbNWETYya_g@mail.gmail.com>
Date: Wed, 2 Aug 2023 19:37:21 +0200
From: Miguel Ojeda <miguel.ojeda.sandonis@...il.com>
To: Alice Ryhl <aliceryhl@...gle.com>
Cc: rust-for-linux@...r.kernel.org, Miguel Ojeda <ojeda@...nel.org>,
Wedson Almeida Filho <wedsonaf@...il.com>,
Alex Gaynor <alex.gaynor@...il.com>,
Boqun Feng <boqun.feng@...il.com>, Gary Guo <gary@...yguo.net>,
Björn Roy Baron <bjorn3_gh@...tonmail.com>,
Benno Lossin <benno.lossin@...ton.me>,
linux-kernel@...r.kernel.org, patches@...ts.linux.dev
Subject: Re: [PATCH] rust: delete `ForeignOwnable::borrow_mut`
On Thu, Jul 6, 2023 at 11:46 AM Alice Ryhl <aliceryhl@...gle.com> wrote:
>
> We discovered that the current design of `borrow_mut` is problematic.
> This patch removes it until a better solution can be found.
>
> Specifically, the current design gives you access to a `&mut T`, which
> lets you change where the `ForeignOwnable` points (e.g., with
> `core::mem::swap`). No upcoming user of this API intended to make that
> possible, making all of them unsound.
>
> Signed-off-by: Alice Ryhl <aliceryhl@...gle.com>
Applied to `rust-fixes`, thanks! I added a `Fixes` tag.
Cheers,
Miguel
Powered by blists - more mailing lists