@@ -133,15 +133,28 @@ attribute in Rust source. The value can be a boolean, string, or an object with
133
133
- If not specified, the default is ` false `
134
134
135
135
If a downstream crate attempts to use a feature marked ` deprecated ` , Cargo
136
- should produce a warning. This warning should not be emitted for crates that
137
- reexport the feature under a feature also marked deprecated. For example: crate
138
- ` foo ` exports feature ` phooey ` , and crate ` bar ` exports feature
139
- ` barred = ["foo/phooey"] ` . If ` foo ` markes ` bar ` as deprecated, running any
140
- cargo action on ` bar ` will emit a warning unless ` barred ` is also marked
141
- `deprecated.
136
+ should produce a warning that contains the ` note ` . This warning should not be
137
+ emitted for crates that reexport the feature under a feature also marked
138
+ deprecated. For example: crate ` foo ` exports feature ` phooey ` , and crate ` bar `
139
+ exports feature ` barred = ["foo/phooey"] ` . If ` foo ` markes ` bar ` as deprecated,
140
+ running any cargo action on ` bar ` will emit a warning unless ` barred ` is also
141
+ marked `deprecated.
142
142
143
143
Accessing this information will require access to the manifest.
144
144
145
+ ### A note on ` since `
146
+
147
+ The exact behavior of the ` since ` key is not provided in this RFC as there are
148
+ decisions related to resolution that need to be made. The generally accepted
149
+ concept is that there should be a warning if a deprecated feature is used _ and_
150
+ there is something actionable to resolve this issue for all downstream crates -
151
+ but the details of how best to do this are not yet clear. Please see [ discussion
152
+ on since] .
153
+
154
+ If the exact behavior of ` since ` does not reach consensus before ` deprecated ` is
155
+ nearing stabilization, this key can stabilized separately or dropped entirely.
156
+
157
+
145
158
## ` public `
146
159
147
160
` public ` is a boolean value that defaults to ` true ` . It can be thought of as
@@ -313,8 +326,8 @@ ignore this key, newer Cargo would be able to merge `features`, `features2`, and
313
326
- Should there be a simple `--allow-private-features` flag that allows using
314
327
all features, such as for crater runs? This can be decided during
315
328
implementation.
316
- - How should `since` work with the `deprecated` key? This can be decided
317
- during implementation or droped entirely .
329
+ - How should `since` work with the `deprecated` key? See
330
+ [ a note on `since` ] (#a-note-on-since) for further information .
318
331
319
332
It is worth noting that not all of these new keys need to be made available at
320
333
once. `enables` needs to be implemented first, but support for all others could
@@ -361,7 +374,8 @@ be added over time.
361
374
[cargo #10882 ]: https://github.com/rust-lang/cargo/issues/10882
362
375
[`cargo-info` ]: https://github.com/rust-lang/cargo/issues/948
363
376
[`deprecated` ]: https://doc.rust-lang.org/reference/attributes/diagnostics.html#the-deprecated-attribute
364
- [`deprecated-suggestions` ]: https://github.com/rust-lang/rust/issues/94785#issuecomment-1579349116
377
+ [`deprecated-suggestions` ]: https://github.com/rust-lang/rust/issues/94785
378
+ [discussion on since ]: https://github.com/rust-lang/rfcs/pull/3416#discussion_r1172895497
365
379
[`public_private_dependencies` ]: https://rust-lang.github.io/rfcs/1977-public-private-dependencies.html
366
380
[`rustdoc-cargo-configuration` ]: https://github.com/rust-lang/rfcs/pull/3421
367
381
[`tokio` ]: https://docs.rs/crate/tokio/latest/features
0 commit comments