Skip to content

Commit a0f6b0a

Browse files
committed
More info about the index
1 parent a390e5c commit a0f6b0a

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

text/3416-feature-metadata.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,21 @@ attempt to present them in the following way:
257257
For features that require new information in the index, it should be possible to
258258
add this information under a `features3` key. Older versions of Cargo will
259259
ignore this key, newer Cargo would be able to merge `features`, `features2`, and
260-
`features3`.
260+
`features3`. `features3` should mirror the most complete syntax of the
261+
`[features]` table, i.e.:
262+
263+
```json5
264+
"features3": {
265+
"bar": {
266+
enables: ["foo"],
267+
deprecated = { since = "1.2.3", note = "don't use this" }
268+
}
269+
}
270+
```
271+
272+
In order to conserve index space, default keys should be omitted. `Cargo` should
273+
ignore unrecognized keys within a feature, to allow for future additions without
274+
needing a new `features` section.
261275

262276
# Drawbacks
263277

0 commit comments

Comments
 (0)