Centos-kernel-stream-10/rust/kernel
Alice Ryhl 35cad617df rust: make `UnsafeCell` the outer type in `Opaque`
When combining `UnsafeCell` with `MaybeUninit`, it is idiomatic to use
`UnsafeCell` as the outer type. Intuitively, this is because a
`MaybeUninit<T>` might not contain a `T`, but we always want the effect
of the `UnsafeCell`, even if the inner value is uninitialized.

Now, strictly speaking, this doesn't really make a difference. The
compiler will always apply the `UnsafeCell` effect even if the inner
value is uninitialized. But I think we should follow the convention
here.

Signed-off-by: Alice Ryhl <aliceryhl@google.com>
Reviewed-by: Benno Lossin <benno.lossin@proton.me>
Reviewed-by: Gary Guo <gary@garyguo.net>
Reviewed-by: Martin Rodriguez Reboredo <yakoyoku@gmail.com>
Link: https://lore.kernel.org/r/20230614115328.2825961-1-aliceryhl@google.com
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
2023-08-10 01:18:34 +02:00
..
init rust: init: update macro expansion example in docs 2023-05-31 18:53:10 +02:00
sync rust: lock: Add intra-doc links to the Backend trait 2023-08-07 11:33:33 +02:00
allocator.rs rust: alloc: Add realloc and alloc_zeroed to the GlobalAlloc impl 2023-08-07 11:33:34 +02:00
build_assert.rs
error.rs rust: error: `impl Debug` for `Error` with `errname()` integration 2023-06-13 01:24:42 +02:00
init.rs
ioctl.rs
lib.rs
prelude.rs
print.rs
static_assert.rs
std_vendor.rs
str.rs rust: str: add conversion from `CStr` to `CString` 2023-05-31 18:53:10 +02:00
sync.rs
task.rs rust: task: add `Send` marker to `Task` 2023-05-31 18:53:10 +02:00
types.rs rust: make `UnsafeCell` the outer type in `Opaque` 2023-08-10 01:18:34 +02:00