Skip to content

Commit 3f089c8

Browse files
committed
fix doc links in type_props module
1 parent 10f91d4 commit 3f089c8

1 file changed

Lines changed: 4 additions & 6 deletions

File tree

src/traits/data/type_props.rs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -486,7 +486,7 @@ impl<T: ?Sized> PtrProps<T> for NonNull<T> {
486486
/// # Safety
487487
///
488488
/// The implementor must ensure that [`SubType`](VarSized::SubType) is the actual element type
489-
/// contained, that the type's `KnownAlign::ALN` accurately reflects the type's alignment
489+
/// contained, that the type's [`KnownAlign::ALN`] accurately reflects the type's alignment
490490
/// requirement in all safe contexts, and that this type has `usize` metadata
491491
/// (`<Self as Pointee>::Metadata = usize`).
492492
pub unsafe trait VarSized: KnownAlign {
@@ -516,7 +516,7 @@ pub unsafe trait VarSized: KnownAlign {
516516
/// # Safety
517517
///
518518
/// The implementor must ensure that [`SubType`](VarSized::SubType) is the actual element type
519-
/// contained, and that the type's `KnownAlign::ALN` accurately reflects the type's alignment
519+
/// contained, and that the type's [`KnownAlign::ALN`] accurately reflects the type's alignment
520520
/// requirement in all safe contexts.
521521
pub unsafe trait VarSized: ::core::ptr::Pointee<Metadata = usize> + KnownAlign {
522522
/// The element type.
@@ -539,15 +539,13 @@ pub unsafe trait VarSized: ::core::ptr::Pointee<Metadata = usize> + KnownAlign {
539539
varsized_nonnull_from_parts(<Self::SubType as SizedProps>::DANGLING_PTR.cast(), 0);
540540
}
541541

542-
// TODO: derive macro/other macros to help implement this would be very useful
543-
544542
#[cfg(not(feature = "metadata"))]
545543
/// Trait for unsized _structs_ that have a [`VarSized`] tail.
546544
///
547545
/// # Safety
548546
///
549547
/// The implementor must ensure that [`Tail`](VarSizedStruct::Tail) is the actual tail type
550-
/// contained, that the type's `KnownAlign::ALN` accurately reflects the type's alignment
548+
/// contained, that the type's [`KnownAlign::ALN`] accurately reflects the type's alignment
551549
/// requirement in all safe contexts, and that this type has `usize` metadata (`<Self as
552550
/// Pointee>::Metadata = usize`).
553551
pub unsafe trait VarSizedStruct: KnownAlign {
@@ -564,7 +562,7 @@ pub unsafe trait VarSizedStruct: KnownAlign {
564562
/// # Safety
565563
///
566564
/// The implementor must ensure that [`Tail`](VarSizedStruct::Tail) is the actual tail type
567-
/// contained, and that the type's `KnownAlign::ALN` accurately reflects the type's alignment
565+
/// contained, and that the type's [`KnownAlign::ALN`] accurately reflects the type's alignment
568566
/// requirement in all safe contexts.
569567
pub unsafe trait VarSizedStruct:
570568
::core::ptr::Pointee<Metadata = usize> + KnownAlign

0 commit comments

Comments
 (0)