diff options
author | Matthew Auld <matthew.auld@intel.com> | 2025-09-24 13:38:58 +0100 |
---|---|---|
committer | Matthew Auld <matthew.auld@intel.com> | 2025-09-24 13:38:58 +0100 |
commit | f8e56b4d296938a7981e8d1df34cff7766bb2ab9 (patch) | |
tree | ec146148c9e1b73b565b8787e9625262a39e025a /rust/pin-init/src/lib.rs | |
parent | c154e7fceb3ead80cb7884f6a1b6ace3a6bab084 (diff) | |
parent | 342f141ba9f4c9e39de342d047a5245e8f4cda19 (diff) |
Merge remote-tracking branch 'drm/drm-next' into drm-tip
# Conflicts:
# drivers/gpu/drm/xe/xe_device_sysfs.c
# drivers/gpu/drm/xe/xe_guc_submit.c
Diffstat (limited to 'rust/pin-init/src/lib.rs')
-rw-r--r-- | rust/pin-init/src/lib.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/rust/pin-init/src/lib.rs b/rust/pin-init/src/lib.rs index 62e013a5cc20..dd553212836e 100644 --- a/rust/pin-init/src/lib.rs +++ b/rust/pin-init/src/lib.rs @@ -740,6 +740,8 @@ macro_rules! stack_try_pin_init { /// As already mentioned in the examples above, inside of `pin_init!` a `struct` initializer with /// the following modifications is expected: /// - Fields that you want to initialize in-place have to use `<-` instead of `:`. +/// - You can use `_: { /* run any user-code here */ },` anywhere where you can place fields in +/// order to run arbitrary code. /// - In front of the initializer you can write `&this in` to have access to a [`NonNull<Self>`] /// pointer named `this` inside of the initializer. /// - Using struct update syntax one can place `..Zeroable::init_zeroed()` at the very end of the @@ -994,7 +996,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. |