@@ -1603,6 +1603,12 @@ fn publish_dev_dep_stripping() {
1603
1603
Package :: new ( "normal-only" , "1.0.0" )
1604
1604
. feature ( "cat" , & [ ] )
1605
1605
. publish ( ) ;
1606
+ Package :: new ( "optional-dep-feature" , "1.0.0" )
1607
+ . feature ( "cat" , & [ ] )
1608
+ . publish ( ) ;
1609
+ Package :: new ( "optional-namespaced" , "1.0.0" )
1610
+ . feature ( "cat" , & [ ] )
1611
+ . publish ( ) ;
1606
1612
Package :: new ( "build-only" , "1.0.0" )
1607
1613
. feature ( "cat" , & [ ] )
1608
1614
. publish ( ) ;
@@ -1644,11 +1650,15 @@ fn publish_dev_dep_stripping() {
1644
1650
"target-build-only/cat",
1645
1651
"target-dev-only/cat",
1646
1652
"target-normal-and-dev/cat",
1653
+ "optional-dep-feature/cat",
1654
+ "dep:optional-namespaced",
1647
1655
]
1648
1656
1649
1657
[dependencies]
1650
1658
normal-only = { version = "1.0", features = ["cat"] }
1651
1659
normal-and-dev = { version = "1.0", features = ["cat"] }
1660
+ optional-dep-feature = { version = "1.0", features = ["cat"], optional = true }
1661
+ optional-namespaced = { version = "1.0", features = ["cat"], optional = true }
1652
1662
1653
1663
[build-dependencies]
1654
1664
build-only = { version = "1.0", features = ["cat"] }
@@ -1738,6 +1748,28 @@ You may press ctrl-c to skip waiting; the crate should be available shortly.
1738
1748
"target": null,
1739
1749
"version_req": "^1.0"
1740
1750
},
1751
+ {
1752
+ "default_features": true,
1753
+ "features": [
1754
+ "cat"
1755
+ ],
1756
+ "kind": "normal",
1757
+ "name": "optional-dep-feature",
1758
+ "optional": true,
1759
+ "target": null,
1760
+ "version_req": "^1.0"
1761
+ },
1762
+ {
1763
+ "default_features": true,
1764
+ "features": [
1765
+ "cat"
1766
+ ],
1767
+ "kind": "normal",
1768
+ "name": "optional-namespaced",
1769
+ "optional": true,
1770
+ "target": null,
1771
+ "version_req": "^1.0"
1772
+ },
1741
1773
{
1742
1774
"default_features": true,
1743
1775
"features": [
@@ -1814,7 +1846,9 @@ You may press ctrl-c to skip waiting; the crate should be available shortly.
1814
1846
"normal-and-dev/cat",
1815
1847
"target-normal-only/cat",
1816
1848
"target-build-only/cat",
1817
- "target-normal-and-dev/cat"
1849
+ "target-normal-and-dev/cat",
1850
+ "optional-dep-feature/cat",
1851
+ "dep:optional-namespaced"
1818
1852
]
1819
1853
},
1820
1854
"homepage": "foo",
@@ -1865,6 +1899,16 @@ features = ["cat"]
1865
1899
version = "1.0"
1866
1900
features = ["cat"]
1867
1901
1902
+ [dependencies.optional-dep-feature]
1903
+ version = "1.0"
1904
+ features = ["cat"]
1905
+ optional = true
1906
+
1907
+ [dependencies.optional-namespaced]
1908
+ version = "1.0"
1909
+ features = ["cat"]
1910
+ optional = true
1911
+
1868
1912
[dev-dependencies.normal-and-dev]
1869
1913
version = "1.0"
1870
1914
features = ["cat"]
@@ -1881,6 +1925,8 @@ foo_feature = [
1881
1925
"target-normal-only/cat",
1882
1926
"target-build-only/cat",
1883
1927
"target-normal-and-dev/cat",
1928
+ "optional-dep-feature/cat",
1929
+ "dep:optional-namespaced",
1884
1930
]
1885
1931
1886
1932
[target."cfg(unix)".dependencies.target-normal-and-dev]
0 commit comments