Lines Matching refs:into

62 //! with `Layout::for_value(&*value)` may be converted into a box using
70 //! pointer pointing into previously allocated memory that since got freed is
113 //! this does not mean that you can convert an arbitrary `T*` into a `Box<T>`
205 /// Allocates memory on the heap and then places `x` into it.
288 Box::new(x).into()
291 /// Allocates memory on the heap then places `x` into it,
365 /// Allocates memory in the given allocator then places `x` into it.
393 /// Allocates memory in the given allocator then places `x` into it,
587 /// Converts a `Box<T>` into a `Box<[T]>`
836 /// writes `value` into it before conversion thus guaranteeing safety.
1021 /// into account the [memory layout] used by `Box`. The easiest way to
1022 /// do this is to convert the raw pointer back into a `Box` with the
1031 /// Converting the raw pointer back into a `Box` with [`Box::from_raw`]
1066 /// into account the [memory layout] used by `Box`. The easiest way to
1067 /// do this is to convert the raw pointer back into a `Box` with the
1076 /// Converting the raw pointer back into a `Box` with [`Box::from_raw_in`]
1115 reason = "use `Box::leak(b).into()` or `Unique::from(Box::leak(b))` instead"
1121 // raw pointer for the type system. Turning it directly into a raw pointer would not be
1185 /// Converts a `Box<T>` into a `Pin<Box<T>>`. If `T` does not implement [`Unpin`], then
1306 /// Copies `source`'s contents into `self` without creating a new allocation.
1334 let buf: Box<[u8]> = self.as_bytes().into();
1445 /// Converts a `T` into a `Box<T>`
1448 /// from the stack into it.
1468 /// Converts a `Box<T>` into a `Pin<Box<T>>`. If `T` does not implement [`Unpin`], then
1514 /// Converts a `&[T]` into a `Box<[T]>`
1536 /// Converts a `Cow<'_, [T]>` into a `Box<[T]>`
1554 /// Converts a `&str` into a `Box<str>`
1574 /// Converts a `Cow<'_, str>` into a `Box<str>`
1608 /// Converts a `Box<str>` into a `Box<[u8]>`
1634 /// Converts a `[T; N]` into a `Box<[T]>`
1669 /// Attempts to convert a `Box<[T]>` into a `Box<[T; N]>`.
1692 /// Attempts to convert a `Vec<T>` into a `Box<[T; N]>`.
2212 /// Converts a type of [`Error`] into a box of dyn [`Error`].
2245 /// Converts a type of [`Error`] + [`Send`] + [`Sync`] into a box of
2284 /// Converts a [`String`] into a box of dyn [`Error`] + [`Send`] + [`Sync`].
2328 /// Converts a [`String`] into a box of dyn [`Error`].
2350 /// Converts a [`str`] into a box of dyn [`Error`] + [`Send`] + [`Sync`].
2374 /// Converts a [`str`] into a box of dyn [`Error`].
2396 /// Converts a [`Cow`] into a box of dyn [`Error`] + [`Send`] + [`Sync`].
2418 /// Converts a [`Cow`] into a box of dyn [`Error`].