Skip to content

Commit 80ef1aa

Browse files
Docs
1 parent 6ca71b6 commit 80ef1aa

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/lib.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,13 @@ use core::marker::PhantomData;
5959
/// than `'static`). This requirement gives an earlier error when `NonDeDuplicated` is used other
6060
/// than intended.
6161
///
62-
/// We don't just limit to be `:'static`, because then `NonDeDuplicated` could still be somewhat
62+
/// We don't just limit `T` to be `:'static`, because then `NonDeDuplicated` could still be somewhat
6363
/// used with non-static lifetimes, and the error would surface only later. The following **would**
6464
/// compile:
6565
/// ```rust
6666
/// # use core::cell::Cell;
6767
///
68+
/// #[repr(transparent)]
6869
/// pub struct NonDeDuplicatedStatic<T: 'static> {
6970
/// cell: Cell<T>,
7071
///}
@@ -75,7 +76,7 @@ use core::marker::PhantomData;
7576
/// ```
7677
/// Only the following would then fail (to compile):
7778
/// ```rust,ignore
78-
/// fn caller<'a>(r: &'a u8) { let u = 0u8; callee(NonDeDuplicatedStatic::new(uref)); }
79+
/// fn caller<'a>(r: &'a u8) { let u = 0u8; callee(NonDeDuplicatedStatic::new(&u)); }
7980
/// ```
8081
///
8182
/// But, by requiring [NonDeDuplicatedFlexible]'s generic parameter `OWN` (or [NonDeDuplicated]'s

0 commit comments

Comments
 (0)