Lines Matching defs:_
149 const _: () = unsafe {
154 |c| T::is_safe(c.transmute::<_, _, BecauseImmutable>())
223 let inner = Ptr::from_mut(self).transmute::<_, _, (_, (_, _))>();
419 Ptr::from_mut(self).transmute::<_, _, (_, (_, _))>().bikeshed_recall_aligned().as_mut()
458 fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result {
465 fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result {
598 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
667 const _: () = unsafe {
679 const _: () = unsafe {
683 |c| T::is_safe(c.cast::<_, <ReadOnly<T> as SizeEq<ReadOnly<ReadOnly<T>>>>::CastFrom, _>())
692 const _: () = unsafe {
696 const _: () = {
751 let ro = Ptr::from_ref(t).transmute::<_, _, (_, _)>();
833 fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result {
855 // `Ptr<'_, T, I>` it is sound to use
857 // shared `Ptr<'_, <T as HasTag<Client>>::Tag,
858 // (_, I::Alignment, I::Validity)>`. Since `ReadOnly<T>` has the same
860 // `Ptr<'_, ReadOnly<T>, I>`.
877 // - By `T: HasField<_, _, _, FIELD_ID>`:
904 fn project(slf: PtrInner<'_, Self>) -> *mut ReadOnly<T::Type> {
905 slf.project::<_, <T as SizeEq<ReadOnly<T>>>::CastFrom>()
906 .project::<_, crate::pointer::cast::Projection<Client, Field, VARIANT_ID, FIELD_ID>>()
907 .project::<_, <ReadOnly<T::Type> as SizeEq<T::Type>>::CastFrom>()
915 // `T::is_projectable`, which is sound because a `Ptr<'_, ReadOnly<T>, I>` will
916 // be projectable exactly when a `Ptr<'_, T, I>` referent is.
1045 assert_eq!(u.get_ptr(), <*const _>::cast::<AU64>(&u));
1046 assert_eq!(u.get_mut_ptr(), <*mut _>::cast::<AU64>(&mut u));
1051 let mut u: Align<_, AU64> = Align::new(Unalign::new(AU64(123)));
1054 // SAFETY: The `Align<_, AU64>` guarantees proper alignment.
1056 // SAFETY: The `Align<_, AU64>` guarantees proper alignment.
1063 let mut u: ForceUnalign<_, AU64> = ForceUnalign::new(Unalign::new(AU64(123)));
1085 const _: () = {
1086 let x: Align<_, AU64> = Align::new(Unalign::new(AU64(123)));
1089 // SAFETY: The `Align<_, AU64>` guarantees proper alignment.
1093 _ => const_unreachable!(),
1131 let u = ForceUnalign::<_, AU64>::new(Unalign::new(AU64(123)));
1187 assert_eq!(&input as *const _, output as *const _);
1197 assert_eq!(&input[..] as *const _, output as *const _);