]> www.infradead.org Git - users/hch/misc.git/commitdiff
rust: pin-init: rename `project` -> `project_this` in doctest
authorBenno Lossin <lossin@kernel.org>
Fri, 5 Sep 2025 17:12:06 +0000 (19:12 +0200)
committerBenno Lossin <lossin@kernel.org>
Thu, 11 Sep 2025 21:26:11 +0000 (23:26 +0200)
The next commit makes the `#[pin_data]` attribute generate a `project`
function that would collide with any existing ones.

Signed-off-by: Benno Lossin <lossin@kernel.org>
rust/pin-init/src/lib.rs

index 62e013a5cc204acfedad8355eb38c097f022478b..2d0d9fd125245dc20a1ca6539122a84559ba5b2a 100644 (file)
@@ -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.