rust-for-linux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] rust: pin-init: rename `project` -> `project_this` in doctest
@ 2025-09-05 17:12 Benno Lossin
  2025-09-05 17:12 ` [PATCH 2/2] rust: pin-init: add pin projections to `#[pin_data]` Benno Lossin
  2025-09-11 21:32 ` [PATCH 1/2] rust: pin-init: rename `project` -> `project_this` in doctest Benno Lossin
  0 siblings, 2 replies; 13+ messages in thread
From: Benno Lossin @ 2025-09-05 17:12 UTC (permalink / raw)
  To: Benno Lossin, Miguel Ojeda, Alex Gaynor, Boqun Feng, Gary Guo,
	Björn Roy Baron, Andreas Hindborg, Alice Ryhl, Trevor Gross,
	Danilo Krummrich, Fiona Behrens, Christian Schrefl
  Cc: rust-for-linux, linux-kernel

The next commit makes the `#[pin_data]` attribute generate a `project`
function that would collide with any existing ones.

Link: https://github.com/Rust-for-Linux/pin-init/pull/75/commits/67fc90312149fd797078578612aac83b459a6ca4
Signed-off-by: Benno Lossin <lossin@kernel.org>
---
 rust/pin-init/src/lib.rs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/rust/pin-init/src/lib.rs b/rust/pin-init/src/lib.rs
index 62e013a5cc20..2d0d9fd12524 100644
--- a/rust/pin-init/src/lib.rs
+++ b/rust/pin-init/src/lib.rs
@@ -994,7 +994,7 @@ macro_rules! try_init {
 /// }
 ///
 /// impl<T> Foo<T> {
-///     fn project(self: Pin<&mut Self>) -> Pin<&mut T> {
+///     fn project_this(self: Pin<&mut Self>) -> Pin<&mut T> {
 ///         assert_pinned!(Foo<T>, elem, T, inline);
 ///
 ///         // SAFETY: The field is structurally pinned.

base-commit: 8f5ae30d69d7543eee0d70083daf4de8fe15d585
-- 
2.50.1


^ permalink raw reply related	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2025-09-11 21:32 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-05 17:12 [PATCH 1/2] rust: pin-init: rename `project` -> `project_this` in doctest Benno Lossin
2025-09-05 17:12 ` [PATCH 2/2] rust: pin-init: add pin projections to `#[pin_data]` Benno Lossin
2025-09-10 10:23   ` Alice Ryhl
2025-09-10 10:24     ` Alice Ryhl
2025-09-10 10:38       ` Benno Lossin
2025-09-10 10:38     ` Benno Lossin
2025-09-10 10:54       ` Alice Ryhl
2025-09-10 12:18         ` Benno Lossin
2025-09-10 12:28           ` Alice Ryhl
2025-09-10 12:52             ` Benno Lossin
2025-09-11  3:31           ` Boqun Feng
2025-09-10 22:20   ` Gary Guo
2025-09-11 21:32 ` [PATCH 1/2] rust: pin-init: rename `project` -> `project_this` in doctest Benno Lossin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).