Skip to content

Commit 728b5fd

Browse files
(not to be worded as-is in final patch email) apply suggestions
1 parent 22607a7 commit 728b5fd

2 files changed

Lines changed: 6 additions & 3 deletions

File tree

rust/kernel/lib.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,10 @@
1717
CONFIG_RUST_COERCE_POINTEE,
1818
feature(derive_coerce_pointee, pin_coerce_unsized_trait)
1919
)]
20-
#![cfg_attr(not(CONFIG_RUST_COERCE_POINTEE), feature(coerce_unsized, unsize))]
20+
#![cfg_attr(
21+
not(CONFIG_RUST_COERCE_POINTEE),
22+
feature(coerce_unsized, dispatch_from_dyn, unsize)
23+
)]
2124
#![feature(inline_const)]
2225
#![feature(lint_reasons)]
2326

rust/kernel/sync/arc.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ mod std_vendor;
129129
/// let coerced: Arc<dyn MyTrait> = obj;
130130
/// # Ok::<(), Error>(())
131131
/// ```
132-
#[cfg_attr(CONFIG_RUST_COERCE_POINTEE, repr(transparent))]
132+
#[repr(transparent)]
133133
#[cfg_attr(CONFIG_RUST_COERCE_POINTEE, derive(CoercePointee))]
134134
pub struct Arc<T: ?Sized> {
135135
ptr: NonNull<ArcInner<T>>,
@@ -479,7 +479,7 @@ impl<T: ?Sized> From<Pin<UniqueArc<T>>> for Arc<T> {
479479
/// obj.as_arc_borrow().use_reference();
480480
/// # Ok::<(), Error>(())
481481
/// ```
482-
#[cfg_attr(CONFIG_RUST_COERCE_POINTEE, repr(transparent))]
482+
#[repr(transparent)]
483483
#[cfg_attr(CONFIG_RUST_COERCE_POINTEE, derive(CoercePointee))]
484484
pub struct ArcBorrow<'a, T: ?Sized + 'a> {
485485
inner: NonNull<ArcInner<T>>,

0 commit comments

Comments
 (0)