@@ -39,7 +39,7 @@ impl<'de> Deserialize<'de> for () {
39
39
}
40
40
41
41
#[ cfg( feature = "unstable" ) ]
42
- #[ cfg_attr( doc_cfg , doc( cfg( feature = "unstable" ) ) ) ]
42
+ #[ cfg_attr( docsrs , doc( cfg( feature = "unstable" ) ) ) ]
43
43
impl < ' de > Deserialize < ' de > for ! {
44
44
fn deserialize < D > ( _deserializer : D ) -> Result < Self , D :: Error >
45
45
where
@@ -695,7 +695,7 @@ impl<'a, 'de> Visitor<'de> for StringInPlaceVisitor<'a> {
695
695
}
696
696
697
697
#[ cfg( any( feature = "std" , feature = "alloc" ) ) ]
698
- #[ cfg_attr( doc_cfg , doc( cfg( any( feature = "std" , feature = "alloc" ) ) ) ) ]
698
+ #[ cfg_attr( docsrs , doc( cfg( any( feature = "std" , feature = "alloc" ) ) ) ) ]
699
699
impl < ' de > Deserialize < ' de > for String {
700
700
fn deserialize < D > ( deserializer : D ) -> Result < Self , D :: Error >
701
701
where
@@ -839,7 +839,7 @@ impl<'de> Visitor<'de> for CStringVisitor {
839
839
}
840
840
841
841
#[ cfg( any( feature = "std" , all( not( no_core_cstr) , feature = "alloc" ) ) ) ]
842
- #[ cfg_attr( doc_cfg , doc( cfg( any( feature = "std" , feature = "alloc" ) ) ) ) ]
842
+ #[ cfg_attr( docsrs , doc( cfg( any( feature = "std" , feature = "alloc" ) ) ) ) ]
843
843
impl < ' de > Deserialize < ' de > for CString {
844
844
fn deserialize < D > ( deserializer : D ) -> Result < Self , D :: Error >
845
845
where
@@ -868,7 +868,7 @@ macro_rules! forwarded_impl {
868
868
869
869
forwarded_impl ! {
870
870
#[ cfg( any( feature = "std" , all( not( no_core_cstr) , feature = "alloc" ) ) ) ]
871
- #[ cfg_attr( doc_cfg , doc( cfg( any( feature = "std" , feature = "alloc" ) ) ) ) ]
871
+ #[ cfg_attr( docsrs , doc( cfg( any( feature = "std" , feature = "alloc" ) ) ) ) ]
872
872
( ) , Box <CStr >, CString :: into_boxed_c_str
873
873
}
874
874
@@ -1086,7 +1086,7 @@ fn nop_reserve<T>(_seq: T, _n: usize) {}
1086
1086
1087
1087
seq_impl ! (
1088
1088
#[ cfg( any( feature = "std" , feature = "alloc" ) ) ]
1089
- #[ cfg_attr( doc_cfg , doc( cfg( any( feature = "std" , feature = "alloc" ) ) ) ) ]
1089
+ #[ cfg_attr( docsrs , doc( cfg( any( feature = "std" , feature = "alloc" ) ) ) ) ]
1090
1090
BinaryHeap <T : Ord >,
1091
1091
seq,
1092
1092
BinaryHeap :: clear,
@@ -1097,7 +1097,7 @@ seq_impl!(
1097
1097
1098
1098
seq_impl ! (
1099
1099
#[ cfg( any( feature = "std" , feature = "alloc" ) ) ]
1100
- #[ cfg_attr( doc_cfg , doc( cfg( any( feature = "std" , feature = "alloc" ) ) ) ) ]
1100
+ #[ cfg_attr( docsrs , doc( cfg( any( feature = "std" , feature = "alloc" ) ) ) ) ]
1101
1101
BTreeSet <T : Eq + Ord >,
1102
1102
seq,
1103
1103
BTreeSet :: clear,
@@ -1108,7 +1108,7 @@ seq_impl!(
1108
1108
1109
1109
seq_impl ! (
1110
1110
#[ cfg( any( feature = "std" , feature = "alloc" ) ) ]
1111
- #[ cfg_attr( doc_cfg , doc( cfg( any( feature = "std" , feature = "alloc" ) ) ) ) ]
1111
+ #[ cfg_attr( docsrs , doc( cfg( any( feature = "std" , feature = "alloc" ) ) ) ) ]
1112
1112
LinkedList <T >,
1113
1113
seq,
1114
1114
LinkedList :: clear,
@@ -1119,7 +1119,7 @@ seq_impl!(
1119
1119
1120
1120
seq_impl ! (
1121
1121
#[ cfg( feature = "std" ) ]
1122
- #[ cfg_attr( doc_cfg , doc( cfg( feature = "std" ) ) ) ]
1122
+ #[ cfg_attr( docsrs , doc( cfg( feature = "std" ) ) ) ]
1123
1123
HashSet <T : Eq + Hash , S : BuildHasher + Default >,
1124
1124
seq,
1125
1125
HashSet :: clear,
@@ -1130,7 +1130,7 @@ seq_impl!(
1130
1130
1131
1131
seq_impl ! (
1132
1132
#[ cfg( any( feature = "std" , feature = "alloc" ) ) ]
1133
- #[ cfg_attr( doc_cfg , doc( cfg( any( feature = "std" , feature = "alloc" ) ) ) ) ]
1133
+ #[ cfg_attr( docsrs , doc( cfg( any( feature = "std" , feature = "alloc" ) ) ) ) ]
1134
1134
VecDeque <T >,
1135
1135
seq,
1136
1136
VecDeque :: clear,
@@ -1142,7 +1142,7 @@ seq_impl!(
1142
1142
////////////////////////////////////////////////////////////////////////////////
1143
1143
1144
1144
#[ cfg( any( feature = "std" , feature = "alloc" ) ) ]
1145
- #[ cfg_attr( doc_cfg , doc( cfg( any( feature = "std" , feature = "alloc" ) ) ) ) ]
1145
+ #[ cfg_attr( docsrs , doc( cfg( any( feature = "std" , feature = "alloc" ) ) ) ) ]
1146
1146
impl < ' de , T > Deserialize < ' de > for Vec < T >
1147
1147
where
1148
1148
T : Deserialize < ' de > ,
@@ -1546,15 +1546,15 @@ macro_rules! map_impl {
1546
1546
1547
1547
map_impl ! {
1548
1548
#[ cfg( any( feature = "std" , feature = "alloc" ) ) ]
1549
- #[ cfg_attr( doc_cfg , doc( cfg( any( feature = "std" , feature = "alloc" ) ) ) ) ]
1549
+ #[ cfg_attr( docsrs , doc( cfg( any( feature = "std" , feature = "alloc" ) ) ) ) ]
1550
1550
BTreeMap <K : Ord , V >,
1551
1551
map,
1552
1552
BTreeMap :: new( ) ,
1553
1553
}
1554
1554
1555
1555
map_impl ! {
1556
1556
#[ cfg( feature = "std" ) ]
1557
- #[ cfg_attr( doc_cfg , doc( cfg( feature = "std" ) ) ) ]
1557
+ #[ cfg_attr( docsrs , doc( cfg( feature = "std" ) ) ) ]
1558
1558
HashMap <K : Eq + Hash , V , S : BuildHasher + Default >,
1559
1559
map,
1560
1560
HashMap :: with_capacity_and_hasher( size_hint:: cautious:: <( K , V ) >( map. size_hint( ) ) , S :: default ( ) ) ,
@@ -1696,7 +1696,7 @@ macro_rules! deserialize_enum {
1696
1696
}
1697
1697
1698
1698
#[ cfg( feature = "std" ) ]
1699
- #[ cfg_attr( doc_cfg , doc( cfg( feature = "std" ) ) ) ]
1699
+ #[ cfg_attr( docsrs , doc( cfg( feature = "std" ) ) ) ]
1700
1700
impl < ' de > Deserialize < ' de > for net:: IpAddr {
1701
1701
fn deserialize < D > ( deserializer : D ) -> Result < Self , D :: Error >
1702
1702
where
@@ -1717,13 +1717,13 @@ impl<'de> Deserialize<'de> for net::IpAddr {
1717
1717
1718
1718
parse_ip_impl ! {
1719
1719
#[ cfg( feature = "std" ) ]
1720
- #[ cfg_attr( doc_cfg , doc( cfg( feature = "std" ) ) ) ]
1720
+ #[ cfg_attr( docsrs , doc( cfg( feature = "std" ) ) ) ]
1721
1721
net:: Ipv4Addr , "IPv4 address" , 4
1722
1722
}
1723
1723
1724
1724
parse_ip_impl ! {
1725
1725
#[ cfg( feature = "std" ) ]
1726
- #[ cfg_attr( doc_cfg , doc( cfg( feature = "std" ) ) ) ]
1726
+ #[ cfg_attr( docsrs , doc( cfg( feature = "std" ) ) ) ]
1727
1727
net:: Ipv6Addr , "IPv6 address" , 16
1728
1728
}
1729
1729
@@ -1750,7 +1750,7 @@ macro_rules! parse_socket_impl {
1750
1750
}
1751
1751
1752
1752
#[ cfg( feature = "std" ) ]
1753
- #[ cfg_attr( doc_cfg , doc( cfg( feature = "std" ) ) ) ]
1753
+ #[ cfg_attr( docsrs , doc( cfg( feature = "std" ) ) ) ]
1754
1754
impl < ' de > Deserialize < ' de > for net:: SocketAddr {
1755
1755
fn deserialize < D > ( deserializer : D ) -> Result < Self , D :: Error >
1756
1756
where
@@ -1771,14 +1771,14 @@ impl<'de> Deserialize<'de> for net::SocketAddr {
1771
1771
1772
1772
parse_socket_impl ! {
1773
1773
#[ cfg( feature = "std" ) ]
1774
- #[ cfg_attr( doc_cfg , doc( cfg( feature = "std" ) ) ) ]
1774
+ #[ cfg_attr( docsrs , doc( cfg( feature = "std" ) ) ) ]
1775
1775
net:: SocketAddrV4 , "IPv4 socket address" ,
1776
1776
|( ip, port) | net:: SocketAddrV4 :: new( ip, port) ,
1777
1777
}
1778
1778
1779
1779
parse_socket_impl ! {
1780
1780
#[ cfg( feature = "std" ) ]
1781
- #[ cfg_attr( doc_cfg , doc( cfg( feature = "std" ) ) ) ]
1781
+ #[ cfg_attr( docsrs , doc( cfg( feature = "std" ) ) ) ]
1782
1782
net:: SocketAddrV6 , "IPv6 socket address" ,
1783
1783
|( ip, port) | net:: SocketAddrV6 :: new( ip, port, 0 , 0 ) ,
1784
1784
}
@@ -1814,7 +1814,7 @@ impl<'a> Visitor<'a> for PathVisitor {
1814
1814
}
1815
1815
1816
1816
#[ cfg( feature = "std" ) ]
1817
- #[ cfg_attr( doc_cfg , doc( cfg( feature = "std" ) ) ) ]
1817
+ #[ cfg_attr( docsrs , doc( cfg( feature = "std" ) ) ) ]
1818
1818
impl < ' de : ' a , ' a > Deserialize < ' de > for & ' a Path {
1819
1819
fn deserialize < D > ( deserializer : D ) -> Result < Self , D :: Error >
1820
1820
where
@@ -1869,7 +1869,7 @@ impl<'de> Visitor<'de> for PathBufVisitor {
1869
1869
}
1870
1870
1871
1871
#[ cfg( feature = "std" ) ]
1872
- #[ cfg_attr( doc_cfg , doc( cfg( feature = "std" ) ) ) ]
1872
+ #[ cfg_attr( docsrs , doc( cfg( feature = "std" ) ) ) ]
1873
1873
impl < ' de > Deserialize < ' de > for PathBuf {
1874
1874
fn deserialize < D > ( deserializer : D ) -> Result < Self , D :: Error >
1875
1875
where
@@ -1881,7 +1881,7 @@ impl<'de> Deserialize<'de> for PathBuf {
1881
1881
1882
1882
forwarded_impl ! {
1883
1883
#[ cfg( feature = "std" ) ]
1884
- #[ cfg_attr( doc_cfg , doc( cfg( feature = "std" ) ) ) ]
1884
+ #[ cfg_attr( docsrs , doc( cfg( feature = "std" ) ) ) ]
1885
1885
( ) , Box <Path >, PathBuf :: into_boxed_path
1886
1886
}
1887
1887
@@ -1943,7 +1943,7 @@ impl<'de> Visitor<'de> for OsStringVisitor {
1943
1943
}
1944
1944
1945
1945
#[ cfg( all( feature = "std" , any( unix, windows) ) ) ]
1946
- #[ cfg_attr( doc_cfg , doc( cfg( all( feature = "std" , any( unix, windows) ) ) ) ) ]
1946
+ #[ cfg_attr( docsrs , doc( cfg( all( feature = "std" , any( unix, windows) ) ) ) ) ]
1947
1947
impl < ' de > Deserialize < ' de > for OsString {
1948
1948
fn deserialize < D > ( deserializer : D ) -> Result < Self , D :: Error >
1949
1949
where
@@ -1957,30 +1957,30 @@ impl<'de> Deserialize<'de> for OsString {
1957
1957
1958
1958
forwarded_impl ! {
1959
1959
#[ cfg( any( feature = "std" , feature = "alloc" ) ) ]
1960
- #[ cfg_attr( doc_cfg , doc( cfg( any( feature = "std" , feature = "alloc" ) ) ) ) ]
1960
+ #[ cfg_attr( docsrs , doc( cfg( any( feature = "std" , feature = "alloc" ) ) ) ) ]
1961
1961
( T ) , Box <T >, Box :: new
1962
1962
}
1963
1963
1964
1964
forwarded_impl ! {
1965
1965
#[ cfg( any( feature = "std" , feature = "alloc" ) ) ]
1966
- #[ cfg_attr( doc_cfg , doc( cfg( any( feature = "std" , feature = "alloc" ) ) ) ) ]
1966
+ #[ cfg_attr( docsrs , doc( cfg( any( feature = "std" , feature = "alloc" ) ) ) ) ]
1967
1967
( T ) , Box <[ T ] >, Vec :: into_boxed_slice
1968
1968
}
1969
1969
1970
1970
forwarded_impl ! {
1971
1971
#[ cfg( any( feature = "std" , feature = "alloc" ) ) ]
1972
- #[ cfg_attr( doc_cfg , doc( cfg( any( feature = "std" , feature = "alloc" ) ) ) ) ]
1972
+ #[ cfg_attr( docsrs , doc( cfg( any( feature = "std" , feature = "alloc" ) ) ) ) ]
1973
1973
( ) , Box <str >, String :: into_boxed_str
1974
1974
}
1975
1975
1976
1976
forwarded_impl ! {
1977
1977
#[ cfg( all( feature = "std" , any( unix, windows) ) ) ]
1978
- #[ cfg_attr( doc_cfg , doc( cfg( all( feature = "std" , any( unix, windows) ) ) ) ) ]
1978
+ #[ cfg_attr( docsrs , doc( cfg( all( feature = "std" , any( unix, windows) ) ) ) ) ]
1979
1979
( ) , Box <OsStr >, OsString :: into_boxed_os_str
1980
1980
}
1981
1981
1982
1982
#[ cfg( any( feature = "std" , feature = "alloc" ) ) ]
1983
- #[ cfg_attr( doc_cfg , doc( cfg( any( feature = "std" , feature = "alloc" ) ) ) ) ]
1983
+ #[ cfg_attr( docsrs , doc( cfg( any( feature = "std" , feature = "alloc" ) ) ) ) ]
1984
1984
impl < ' de , ' a , T > Deserialize < ' de > for Cow < ' a , T >
1985
1985
where
1986
1986
T : ?Sized + ToOwned ,
@@ -2003,7 +2003,7 @@ where
2003
2003
/// [`"rc"`]: https://serde.rs/feature-flags.html#-features-rc
2004
2004
#[ cfg( all( feature = "rc" , any( feature = "std" , feature = "alloc" ) ) ) ]
2005
2005
#[ cfg_attr(
2006
- doc_cfg ,
2006
+ docsrs ,
2007
2007
doc( cfg( all( feature = "rc" , any( feature = "std" , feature = "alloc" ) ) ) )
2008
2008
) ]
2009
2009
impl < ' de , T > Deserialize < ' de > for RcWeak < T >
@@ -2025,7 +2025,7 @@ where
2025
2025
/// [`"rc"`]: https://serde.rs/feature-flags.html#-features-rc
2026
2026
#[ cfg( all( feature = "rc" , any( feature = "std" , feature = "alloc" ) ) ) ]
2027
2027
#[ cfg_attr(
2028
- doc_cfg ,
2028
+ docsrs ,
2029
2029
doc( cfg( all( feature = "rc" , any( feature = "std" , feature = "alloc" ) ) ) )
2030
2030
) ]
2031
2031
impl < ' de , T > Deserialize < ' de > for ArcWeak < T >
@@ -2073,7 +2073,7 @@ box_forwarded_impl! {
2073
2073
///
2074
2074
/// [`"rc"`]: https://serde.rs/feature-flags.html#-features-rc
2075
2075
#[ cfg( all( feature = "rc" , any( feature = "std" , feature = "alloc" ) ) ) ]
2076
- #[ cfg_attr( doc_cfg , doc( cfg( all( feature = "rc" , any( feature = "std" , feature = "alloc" ) ) ) ) ) ]
2076
+ #[ cfg_attr( docsrs , doc( cfg( all( feature = "rc" , any( feature = "std" , feature = "alloc" ) ) ) ) ) ]
2077
2077
Rc
2078
2078
}
2079
2079
@@ -2086,7 +2086,7 @@ box_forwarded_impl! {
2086
2086
///
2087
2087
/// [`"rc"`]: https://serde.rs/feature-flags.html#-features-rc
2088
2088
#[ cfg( all( feature = "rc" , any( feature = "std" , feature = "alloc" ) ) ) ]
2089
- #[ cfg_attr( doc_cfg , doc( cfg( all( feature = "rc" , any( feature = "std" , feature = "alloc" ) ) ) ) ) ]
2089
+ #[ cfg_attr( docsrs , doc( cfg( all( feature = "rc" , any( feature = "std" , feature = "alloc" ) ) ) ) ) ]
2090
2090
Arc
2091
2091
}
2092
2092
@@ -2110,13 +2110,13 @@ forwarded_impl! {
2110
2110
2111
2111
forwarded_impl ! {
2112
2112
#[ cfg( feature = "std" ) ]
2113
- #[ cfg_attr( doc_cfg , doc( cfg( feature = "std" ) ) ) ]
2113
+ #[ cfg_attr( docsrs , doc( cfg( feature = "std" ) ) ) ]
2114
2114
( T ) , Mutex <T >, Mutex :: new
2115
2115
}
2116
2116
2117
2117
forwarded_impl ! {
2118
2118
#[ cfg( feature = "std" ) ]
2119
- #[ cfg_attr( doc_cfg , doc( cfg( feature = "std" ) ) ) ]
2119
+ #[ cfg_attr( docsrs , doc( cfg( feature = "std" ) ) ) ]
2120
2120
( T ) , RwLock <T >, RwLock :: new
2121
2121
}
2122
2122
@@ -2271,7 +2271,7 @@ impl<'de> Deserialize<'de> for Duration {
2271
2271
////////////////////////////////////////////////////////////////////////////////
2272
2272
2273
2273
#[ cfg( feature = "std" ) ]
2274
- #[ cfg_attr( doc_cfg , doc( cfg( feature = "std" ) ) ) ]
2274
+ #[ cfg_attr( docsrs , doc( cfg( feature = "std" ) ) ) ]
2275
2275
impl < ' de > Deserialize < ' de > for SystemTime {
2276
2276
fn deserialize < D > ( deserializer : D ) -> Result < Self , D :: Error >
2277
2277
where
@@ -3107,7 +3107,7 @@ macro_rules! atomic_impl {
3107
3107
( $( $ty: ident $size: expr) * ) => {
3108
3108
$(
3109
3109
#[ cfg( any( no_target_has_atomic, target_has_atomic = $size) ) ]
3110
- #[ cfg_attr( doc_cfg , doc( cfg( all( feature = "std" , target_has_atomic = $size) ) ) ) ]
3110
+ #[ cfg_attr( docsrs , doc( cfg( all( feature = "std" , target_has_atomic = $size) ) ) ) ]
3111
3111
impl <' de> Deserialize <' de> for $ty {
3112
3112
fn deserialize<D >( deserializer: D ) -> Result <Self , D :: Error >
3113
3113
where
0 commit comments