@@ -789,14 +789,14 @@ pub struct PatField {
789789#[ derive( Clone ,  Copy ,  Debug ,  Eq ,  PartialEq ) ]  
790790#[ derive( Encodable ,  Decodable ,  HashStable_Generic ,  Walkable ) ]  
791791pub  enum  ByRef  { 
792-     Yes ( Mutability ) , 
792+     Yes ( Pinnedness ,   Mutability ) , 
793793    No , 
794794} 
795795
796796impl  ByRef  { 
797797    #[ must_use]  
798798    pub  fn  cap_ref_mutability ( mut  self ,  mutbl :  Mutability )  -> Self  { 
799-         if  let  ByRef :: Yes ( old_mutbl)  = & mut  self  { 
799+         if  let  ByRef :: Yes ( _ ,   old_mutbl)  = & mut  self  { 
800800            * old_mutbl = cmp:: min ( * old_mutbl,  mutbl) ; 
801801        } 
802802        self 
@@ -814,20 +814,33 @@ pub struct BindingMode(pub ByRef, pub Mutability);
814814
815815impl  BindingMode  { 
816816    pub  const  NONE :  Self  = Self ( ByRef :: No ,  Mutability :: Not ) ; 
817-     pub  const  REF :  Self  = Self ( ByRef :: Yes ( Mutability :: Not ) ,  Mutability :: Not ) ; 
817+     pub  const  REF :  Self  = Self ( ByRef :: Yes ( Pinnedness :: Not ,  Mutability :: Not ) ,  Mutability :: Not ) ; 
818+     pub  const  REF_PIN :  Self  =
819+         Self ( ByRef :: Yes ( Pinnedness :: Pinned ,  Mutability :: Not ) ,  Mutability :: Not ) ; 
818820    pub  const  MUT :  Self  = Self ( ByRef :: No ,  Mutability :: Mut ) ; 
819-     pub  const  REF_MUT :  Self  = Self ( ByRef :: Yes ( Mutability :: Mut ) ,  Mutability :: Not ) ; 
820-     pub  const  MUT_REF :  Self  = Self ( ByRef :: Yes ( Mutability :: Not ) ,  Mutability :: Mut ) ; 
821-     pub  const  MUT_REF_MUT :  Self  = Self ( ByRef :: Yes ( Mutability :: Mut ) ,  Mutability :: Mut ) ; 
821+     pub  const  REF_MUT :  Self  = Self ( ByRef :: Yes ( Pinnedness :: Not ,  Mutability :: Mut ) ,  Mutability :: Not ) ; 
822+     pub  const  REF_PIN_MUT :  Self  =
823+         Self ( ByRef :: Yes ( Pinnedness :: Pinned ,  Mutability :: Mut ) ,  Mutability :: Not ) ; 
824+     pub  const  MUT_REF :  Self  = Self ( ByRef :: Yes ( Pinnedness :: Not ,  Mutability :: Not ) ,  Mutability :: Mut ) ; 
825+     pub  const  MUT_REF_PIN :  Self  =
826+         Self ( ByRef :: Yes ( Pinnedness :: Pinned ,  Mutability :: Not ) ,  Mutability :: Mut ) ; 
827+     pub  const  MUT_REF_MUT :  Self  =
828+         Self ( ByRef :: Yes ( Pinnedness :: Not ,  Mutability :: Mut ) ,  Mutability :: Mut ) ; 
829+     pub  const  MUT_REF_PIN_MUT :  Self  =
830+         Self ( ByRef :: Yes ( Pinnedness :: Pinned ,  Mutability :: Mut ) ,  Mutability :: Mut ) ; 
822831
823832    pub  fn  prefix_str ( self )  -> & ' static  str  { 
824833        match  self  { 
825834            Self :: NONE  => "" , 
826835            Self :: REF  => "ref " , 
836+             Self :: REF_PIN  => "ref pin const " , 
827837            Self :: MUT  => "mut " , 
828838            Self :: REF_MUT  => "ref mut " , 
839+             Self :: REF_PIN_MUT  => "ref pin mut " , 
829840            Self :: MUT_REF  => "mut ref " , 
841+             Self :: MUT_REF_PIN  => "mut ref pin " , 
830842            Self :: MUT_REF_MUT  => "mut ref mut " , 
843+             Self :: MUT_REF_PIN_MUT  => "mut ref pin mut " , 
831844        } 
832845    } 
833846} 
0 commit comments