File tree Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -162,6 +162,12 @@ impl Span {
162162 Span ( imp:: Span :: def_site ( ) )
163163 }
164164
165+ /// This method is only available when the `"unstable"` feature is enabled.
166+ #[ cfg( feature = "unstable" ) ]
167+ pub fn unstable ( self ) -> proc_macro:: Span {
168+ self . 0 . unstable ( )
169+ }
170+
165171 #[ cfg( procmacro2_unstable) ]
166172 pub fn source_file ( & self ) -> SourceFile {
167173 SourceFile ( self . 0 . source_file ( ) )
Original file line number Diff line number Diff line change @@ -225,6 +225,10 @@ impl Span {
225225 Span ( proc_macro:: Span :: def_site ( ) )
226226 }
227227
228+ pub fn unstable ( self ) -> proc_macro:: Span {
229+ self . 0
230+ }
231+
228232 #[ cfg( procmacro2_unstable) ]
229233 pub fn source_file ( & self ) -> SourceFile {
230234 SourceFile :: new ( self . 0 . source_file ( ) )
You can’t perform that action at this time.
0 commit comments