Skip to content

Commit 11df198

Browse files
authored
docs(ref): Note that target-edition is deprecated (#15292)
### What does this PR try to resolve? This is the first step in implementing rust-lang/rfcs#3772 (tracking issue #15283) ### How should we test and review this PR? Leaving off any talk of it being removed until we know the edition. ### Additional information
2 parents 21f4080 + 5ff2960 commit 11df198

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

src/doc/src/reference/cargo-targets.md

+7-9
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,6 @@ bench = true # Is benchmarked by default.
186186
doc = true # Is documented by default.
187187
proc-macro = false # Set to `true` for a proc-macro library.
188188
harness = true # Use libtest harness.
189-
edition = "2015" # The edition of the target.
190189
crate-type = ["lib"] # The crate types to generate.
191190
required-features = [] # Features required to build this target (N/A for lib).
192191
```
@@ -268,14 +267,6 @@ to run tests and benchmarks.
268267
Tests have the [`cfg(test)` conditional expression][cfg-test] enabled whether
269268
or not the harness is enabled.
270269

271-
### The `edition` field
272-
273-
The `edition` field defines the [Rust edition] the target will use. If not
274-
specified, it defaults to the [`edition` field][package-edition] for the
275-
`[package]`. This field should usually not be set, and is only intended for
276-
advanced scenarios such as incrementally transitioning a large package to a
277-
new edition.
278-
279270
### The `crate-type` field
280271

281272
The `crate-type` field defines the [crate types] that will be generated by the
@@ -313,6 +304,13 @@ name = "my-pg-tool"
313304
required-features = ["postgres", "tools"]
314305
```
315306

307+
### The `edition` field
308+
309+
The `edition` field defines the [Rust edition] the target will use. If not
310+
specified, it defaults to the [`edition` field][package-edition] for the
311+
`[package]`.
312+
313+
> **Note:** This field is deprecated and will be removed in a future Edition
316314
317315
## Target auto-discovery
318316

0 commit comments

Comments
 (0)