File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ pub struct SyntaxRefOrId<'a> {
3535 phantom : PhantomData < & ' a Syntax < ' a > > ,
3636}
3737
38- impl SyntaxRefOrId < ' _ > {
38+ impl < ' a > SyntaxRefOrId < ' a > {
3939 pub fn is_ref ( & self ) -> bool {
4040 self . data & 1 == 0
4141 }
@@ -44,7 +44,7 @@ impl SyntaxRefOrId<'_> {
4444 self . data & 1 == 1
4545 }
4646
47- pub fn get_ref < ' a > ( & self ) -> Option < & ' a Syntax < ' a > > {
47+ pub fn get_ref ( & self ) -> Option < & ' a Syntax < ' a > > {
4848 if self . is_ref ( ) {
4949 Some ( unsafe { transmute_copy ( & self . data ) } )
5050 } else {
@@ -56,7 +56,7 @@ impl SyntaxRefOrId<'_> {
5656impl < ' a > From < & ' a Syntax < ' a > > for SyntaxRefOrId < ' a > {
5757 fn from ( s : & ' a Syntax < ' a > ) -> Self {
5858 Self {
59- data : unsafe { transmute_copy ( & s ) } ,
59+ data : s as * const _ as _ ,
6060 phantom : PhantomData ,
6161 }
6262 }
You can’t perform that action at this time.
0 commit comments