Skip to content

Commit

Permalink
docs(ref): Note that target-edition is deprecated (#15292)
Browse files Browse the repository at this point in the history
### 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
  • Loading branch information
weihanglo authored Mar 11, 2025
2 parents 21f4080 + 5ff2960 commit 11df198
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions src/doc/src/reference/cargo-targets.md
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,6 @@ bench = true # Is benchmarked by default.
doc = true # Is documented by default.
proc-macro = false # Set to `true` for a proc-macro library.
harness = true # Use libtest harness.
edition = "2015" # The edition of the target.
crate-type = ["lib"] # The crate types to generate.
required-features = [] # Features required to build this target (N/A for lib).
```
Expand Down Expand Up @@ -268,14 +267,6 @@ to run tests and benchmarks.
Tests have the [`cfg(test)` conditional expression][cfg-test] enabled whether
or not the harness is enabled.

### The `edition` field

The `edition` field defines the [Rust edition] the target will use. If not
specified, it defaults to the [`edition` field][package-edition] for the
`[package]`. This field should usually not be set, and is only intended for
advanced scenarios such as incrementally transitioning a large package to a
new edition.

### The `crate-type` field

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

### The `edition` field

The `edition` field defines the [Rust edition] the target will use. If not
specified, it defaults to the [`edition` field][package-edition] for the
`[package]`.

> **Note:** This field is deprecated and will be removed in a future Edition
## Target auto-discovery

Expand Down

0 comments on commit 11df198

Please sign in to comment.