89
89
#![ doc( html_root_url = "https://docs.rs/proc-macro2/1.0.82" ) ]
90
90
#![ cfg_attr( any( proc_macro_span, super_unstable) , feature( proc_macro_span) ) ]
91
91
#![ cfg_attr( super_unstable, feature( proc_macro_def_site) ) ]
92
- #![ cfg_attr( doc_cfg , feature( doc_cfg) ) ]
92
+ #![ cfg_attr( docsrs , feature( doc_cfg) ) ]
93
93
#![ deny( unsafe_op_in_unsafe_fn) ]
94
94
#![ allow(
95
95
clippy:: cast_lossless,
@@ -175,7 +175,7 @@ use std::ffi::CStr;
175
175
use std:: path:: PathBuf ;
176
176
177
177
#[ cfg( span_locations) ]
178
- #[ cfg_attr( doc_cfg , doc( cfg( feature = "span-locations" ) ) ) ]
178
+ #[ cfg_attr( docsrs , doc( cfg( feature = "span-locations" ) ) ) ]
179
179
pub use crate :: location:: LineColumn ;
180
180
181
181
/// An abstract stream of tokens, or more concretely a sequence of token trees.
@@ -252,15 +252,15 @@ impl FromStr for TokenStream {
252
252
}
253
253
254
254
#[ cfg( feature = "proc-macro" ) ]
255
- #[ cfg_attr( doc_cfg , doc( cfg( feature = "proc-macro" ) ) ) ]
255
+ #[ cfg_attr( docsrs , doc( cfg( feature = "proc-macro" ) ) ) ]
256
256
impl From < proc_macro:: TokenStream > for TokenStream {
257
257
fn from ( inner : proc_macro:: TokenStream ) -> Self {
258
258
TokenStream :: _new ( inner. into ( ) )
259
259
}
260
260
}
261
261
262
262
#[ cfg( feature = "proc-macro" ) ]
263
- #[ cfg_attr( doc_cfg , doc( cfg( feature = "proc-macro" ) ) ) ]
263
+ #[ cfg_attr( docsrs , doc( cfg( feature = "proc-macro" ) ) ) ]
264
264
impl From < TokenStream > for proc_macro:: TokenStream {
265
265
fn from ( inner : TokenStream ) -> Self {
266
266
inner. inner . into ( )
@@ -339,7 +339,7 @@ impl Error for LexError {}
339
339
///
340
340
/// This type is semver exempt and not exposed by default.
341
341
#[ cfg( all( procmacro2_semver_exempt, any( not( wrap_proc_macro) , super_unstable) ) ) ]
342
- #[ cfg_attr( doc_cfg , doc( cfg( procmacro2_semver_exempt) ) ) ]
342
+ #[ cfg_attr( docsrs , doc( cfg( procmacro2_semver_exempt) ) ) ]
343
343
#[ derive( Clone , PartialEq , Eq ) ]
344
344
pub struct SourceFile {
345
345
inner : imp:: SourceFile ,
@@ -428,7 +428,7 @@ impl Span {
428
428
///
429
429
/// This method is semver exempt and not exposed by default.
430
430
#[ cfg( procmacro2_semver_exempt) ]
431
- #[ cfg_attr( doc_cfg , doc( cfg( procmacro2_semver_exempt) ) ) ]
431
+ #[ cfg_attr( docsrs , doc( cfg( procmacro2_semver_exempt) ) ) ]
432
432
pub fn def_site ( ) -> Self {
433
433
Span :: _new ( imp:: Span :: def_site ( ) )
434
434
}
@@ -471,7 +471,7 @@ impl Span {
471
471
///
472
472
/// This method is semver exempt and not exposed by default.
473
473
#[ cfg( all( procmacro2_semver_exempt, any( not( wrap_proc_macro) , super_unstable) ) ) ]
474
- #[ cfg_attr( doc_cfg , doc( cfg( procmacro2_semver_exempt) ) ) ]
474
+ #[ cfg_attr( docsrs , doc( cfg( procmacro2_semver_exempt) ) ) ]
475
475
pub fn source_file ( & self ) -> SourceFile {
476
476
SourceFile :: _new ( self . inner . source_file ( ) )
477
477
}
@@ -486,7 +486,7 @@ impl Span {
486
486
/// procedural macro, such as main.rs or build.rs, the byte range is always
487
487
/// accurate regardless of toolchain.
488
488
#[ cfg( span_locations) ]
489
- #[ cfg_attr( doc_cfg , doc( cfg( feature = "span-locations" ) ) ) ]
489
+ #[ cfg_attr( docsrs , doc( cfg( feature = "span-locations" ) ) ) ]
490
490
pub fn byte_range ( & self ) -> Range < usize > {
491
491
self . inner . byte_range ( )
492
492
}
@@ -501,7 +501,7 @@ impl Span {
501
501
/// outside of a procedural macro, such as main.rs or build.rs, the
502
502
/// line/column are always meaningful regardless of toolchain.
503
503
#[ cfg( span_locations) ]
504
- #[ cfg_attr( doc_cfg , doc( cfg( feature = "span-locations" ) ) ) ]
504
+ #[ cfg_attr( docsrs , doc( cfg( feature = "span-locations" ) ) ) ]
505
505
pub fn start ( & self ) -> LineColumn {
506
506
self . inner . start ( )
507
507
}
@@ -516,7 +516,7 @@ impl Span {
516
516
/// outside of a procedural macro, such as main.rs or build.rs, the
517
517
/// line/column are always meaningful regardless of toolchain.
518
518
#[ cfg( span_locations) ]
519
- #[ cfg_attr( doc_cfg , doc( cfg( feature = "span-locations" ) ) ) ]
519
+ #[ cfg_attr( docsrs , doc( cfg( feature = "span-locations" ) ) ) ]
520
520
pub fn end ( & self ) -> LineColumn {
521
521
self . inner . end ( )
522
522
}
@@ -538,7 +538,7 @@ impl Span {
538
538
///
539
539
/// This method is semver exempt and not exposed by default.
540
540
#[ cfg( procmacro2_semver_exempt) ]
541
- #[ cfg_attr( doc_cfg , doc( cfg( procmacro2_semver_exempt) ) ) ]
541
+ #[ cfg_attr( docsrs , doc( cfg( procmacro2_semver_exempt) ) ) ]
542
542
pub fn eq ( & self , other : & Span ) -> bool {
543
543
self . inner . eq ( & other. inner )
544
544
}
0 commit comments