8989#![ doc( html_root_url = "https://docs.rs/proc-macro2/1.0.82" ) ]
9090#![ cfg_attr( any( proc_macro_span, super_unstable) , feature( proc_macro_span) ) ]
9191#![ cfg_attr( super_unstable, feature( proc_macro_def_site) ) ]
92- #![ cfg_attr( doc_cfg , feature( doc_cfg) ) ]
92+ #![ cfg_attr( docsrs , feature( doc_cfg) ) ]
9393#![ deny( unsafe_op_in_unsafe_fn) ]
9494#![ allow(
9595 clippy:: cast_lossless,
@@ -175,7 +175,7 @@ use std::ffi::CStr;
175175use std:: path:: PathBuf ;
176176
177177#[ cfg( span_locations) ]
178- #[ cfg_attr( doc_cfg , doc( cfg( feature = "span-locations" ) ) ) ]
178+ #[ cfg_attr( docsrs , doc( cfg( feature = "span-locations" ) ) ) ]
179179pub use crate :: location:: LineColumn ;
180180
181181/// An abstract stream of tokens, or more concretely a sequence of token trees.
@@ -252,15 +252,15 @@ impl FromStr for TokenStream {
252252}
253253
254254#[ cfg( feature = "proc-macro" ) ]
255- #[ cfg_attr( doc_cfg , doc( cfg( feature = "proc-macro" ) ) ) ]
255+ #[ cfg_attr( docsrs , doc( cfg( feature = "proc-macro" ) ) ) ]
256256impl From < proc_macro:: TokenStream > for TokenStream {
257257 fn from ( inner : proc_macro:: TokenStream ) -> Self {
258258 TokenStream :: _new ( inner. into ( ) )
259259 }
260260}
261261
262262#[ cfg( feature = "proc-macro" ) ]
263- #[ cfg_attr( doc_cfg , doc( cfg( feature = "proc-macro" ) ) ) ]
263+ #[ cfg_attr( docsrs , doc( cfg( feature = "proc-macro" ) ) ) ]
264264impl From < TokenStream > for proc_macro:: TokenStream {
265265 fn from ( inner : TokenStream ) -> Self {
266266 inner. inner . into ( )
@@ -339,7 +339,7 @@ impl Error for LexError {}
339339///
340340/// This type is semver exempt and not exposed by default.
341341#[ 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) ) ) ]
343343#[ derive( Clone , PartialEq , Eq ) ]
344344pub struct SourceFile {
345345 inner : imp:: SourceFile ,
@@ -428,7 +428,7 @@ impl Span {
428428 ///
429429 /// This method is semver exempt and not exposed by default.
430430 #[ cfg( procmacro2_semver_exempt) ]
431- #[ cfg_attr( doc_cfg , doc( cfg( procmacro2_semver_exempt) ) ) ]
431+ #[ cfg_attr( docsrs , doc( cfg( procmacro2_semver_exempt) ) ) ]
432432 pub fn def_site ( ) -> Self {
433433 Span :: _new ( imp:: Span :: def_site ( ) )
434434 }
@@ -471,7 +471,7 @@ impl Span {
471471 ///
472472 /// This method is semver exempt and not exposed by default.
473473 #[ 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) ) ) ]
475475 pub fn source_file ( & self ) -> SourceFile {
476476 SourceFile :: _new ( self . inner . source_file ( ) )
477477 }
@@ -486,7 +486,7 @@ impl Span {
486486 /// procedural macro, such as main.rs or build.rs, the byte range is always
487487 /// accurate regardless of toolchain.
488488 #[ cfg( span_locations) ]
489- #[ cfg_attr( doc_cfg , doc( cfg( feature = "span-locations" ) ) ) ]
489+ #[ cfg_attr( docsrs , doc( cfg( feature = "span-locations" ) ) ) ]
490490 pub fn byte_range ( & self ) -> Range < usize > {
491491 self . inner . byte_range ( )
492492 }
@@ -501,7 +501,7 @@ impl Span {
501501 /// outside of a procedural macro, such as main.rs or build.rs, the
502502 /// line/column are always meaningful regardless of toolchain.
503503 #[ cfg( span_locations) ]
504- #[ cfg_attr( doc_cfg , doc( cfg( feature = "span-locations" ) ) ) ]
504+ #[ cfg_attr( docsrs , doc( cfg( feature = "span-locations" ) ) ) ]
505505 pub fn start ( & self ) -> LineColumn {
506506 self . inner . start ( )
507507 }
@@ -516,7 +516,7 @@ impl Span {
516516 /// outside of a procedural macro, such as main.rs or build.rs, the
517517 /// line/column are always meaningful regardless of toolchain.
518518 #[ cfg( span_locations) ]
519- #[ cfg_attr( doc_cfg , doc( cfg( feature = "span-locations" ) ) ) ]
519+ #[ cfg_attr( docsrs , doc( cfg( feature = "span-locations" ) ) ) ]
520520 pub fn end ( & self ) -> LineColumn {
521521 self . inner . end ( )
522522 }
@@ -538,7 +538,7 @@ impl Span {
538538 ///
539539 /// This method is semver exempt and not exposed by default.
540540 #[ cfg( procmacro2_semver_exempt) ]
541- #[ cfg_attr( doc_cfg , doc( cfg( procmacro2_semver_exempt) ) ) ]
541+ #[ cfg_attr( docsrs , doc( cfg( procmacro2_semver_exempt) ) ) ]
542542 pub fn eq ( & self , other : & Span ) -> bool {
543543 self . inner . eq ( & other. inner )
544544 }
0 commit comments