Lines Matching refs:cast
19 pointer::cast,
187 pub fn project<U: ?Sized, C: cast::Project<T, U>>(self) -> PtrInner<'a, U> {
246 let raw = T::raw_from_ptr_len(self.as_non_null().cast(), meta);
337 let bytes = self.as_non_null().cast::<u8>().as_ptr();
391 let base = self.as_non_null().cast::<T>().as_ptr();
437 // FIXME(#429): Once `NonNull::cast` documents that it preserves
439 let base = self.as_non_null().cast::<T>().as_ptr();
445 // `pointer::cast` may induce Undefined Behavior [1]:
513 let start = self.as_non_null().cast::<T>().as_ptr();
538 /// Attempts to cast `self` to a `U` using the given cast type.
541 /// the cast will only succeed if it would produce an object with the given
557 /// - If this is a prefix cast, `ptr` has the same address as `self`.
558 /// - If this is a suffix cast, `remainder` has the same address as `self`.
607 let base = target.as_non_null().cast::<u8>();