@@ -135,12 +135,6 @@ impl<Tag> MemPlace<Tag> {
135135 MemPlace { ptr, align, meta : MemPlaceMeta :: None }
136136 }
137137
138- /// Produces a Place that will error if attempted to be read from or written to
139- #[ inline( always) ]
140- fn null ( cx : & impl HasDataLayout ) -> Self {
141- Self :: from_scalar_ptr ( Scalar :: null_ptr ( cx) , Align :: from_bytes ( 1 ) . unwrap ( ) )
142- }
143-
144138 #[ inline( always) ]
145139 pub fn from_ptr ( ptr : Pointer < Tag > , align : Align ) -> Self {
146140 Self :: from_scalar_ptr ( ptr. into ( ) , align)
@@ -260,12 +254,6 @@ impl<'tcx, Tag: ::std::fmt::Debug + Copy> OpTy<'tcx, Tag> {
260254}
261255
262256impl < Tag : :: std:: fmt:: Debug > Place < Tag > {
263- /// Produces a Place that will error if attempted to be read from or written to
264- #[ inline( always) ]
265- fn null ( cx : & impl HasDataLayout ) -> Self {
266- Place :: Ptr ( MemPlace :: null ( cx) )
267- }
268-
269257 #[ inline]
270258 pub fn assert_mem_place ( self ) -> MemPlace < Tag > {
271259 match self {
@@ -276,10 +264,6 @@ impl<Tag: ::std::fmt::Debug> Place<Tag> {
276264}
277265
278266impl < ' tcx , Tag : :: std:: fmt:: Debug > PlaceTy < ' tcx , Tag > {
279- pub fn null ( cx : & impl HasDataLayout , layout : TyAndLayout < ' tcx > ) -> Self {
280- Self { place : Place :: null ( cx) , layout }
281- }
282-
283267 #[ inline]
284268 pub fn assert_mem_place ( self ) -> MPlaceTy < ' tcx , Tag > {
285269 MPlaceTy { mplace : self . place . assert_mem_place ( ) , layout : self . layout }
0 commit comments