Skip to content

Commit f63f23f

Browse files
committed
Auto merge of #10609 - Muscraft:move-unstable-workspace-docs, r=epage
move workspace inheritance untable docs to the correct place Workspace inheritance unstable docs were under `Stabilized and removed features`. This moves them to the correct location r? `@epage`
2 parents caca7f2 + d88aee8 commit f63f23f

File tree

1 file changed

+63
-63
lines changed

1 file changed

+63
-63
lines changed

src/doc/src/reference/unstable.md

Lines changed: 63 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -1228,6 +1228,68 @@ For instance:
12281228
cargo check -Z unstable-options -Z check-cfg-well-known-values
12291229
```
12301230

1231+
### workspace-inheritance
1232+
1233+
* RFC: [#2906](https://github.com/rust-lang/rfcs/blob/master/text/2906-cargo-workspace-deduplicate.md)
1234+
* Tracking Issue: [#8415](https://github.com/rust-lang/cargo/issues/8415)
1235+
1236+
The `workspace-inheritance` feature allows workspace members to inherit fields
1237+
and dependencies from a workspace.
1238+
1239+
Example 1:
1240+
1241+
```toml
1242+
# in workspace's Cargo.toml
1243+
[workspace.dependencies]
1244+
log = "0.3.1"
1245+
log2 = { version = "2.0.0", package = "log" }
1246+
serde = { git = 'https://github.com/serde-rs/serde' }
1247+
wasm-bindgen-cli = { path = "crates/cli" }
1248+
```
1249+
1250+
```toml
1251+
# in a workspace member's Cargo.toml
1252+
[dependencies]
1253+
log.workspace = true
1254+
log2.workspace = true
1255+
```
1256+
1257+
Example 2:
1258+
```toml
1259+
# in workspace's Cargo.toml
1260+
[workspace.package]
1261+
version = "1.2.3"
1262+
authors = ["Nice Folks"]
1263+
description = "..."
1264+
documentation = "https://example.github.io/example"
1265+
readme = "README.md"
1266+
homepage = "https://example.com"
1267+
repository = "https://github.com/example/example"
1268+
license = "MIT"
1269+
license-file = "./LICENSE"
1270+
keywords = ["cli"]
1271+
categories = ["development-tools"]
1272+
publish = false
1273+
edition = "2018"
1274+
```
1275+
1276+
```toml
1277+
# in a workspace member's Cargo.toml
1278+
[package]
1279+
version.workspace = true
1280+
authors.workspace = true
1281+
description.workspace = true
1282+
documentation.workspace = true
1283+
readme.workspace = true
1284+
homepage.workspace = true
1285+
repository.workspace = true
1286+
license.workspace = true
1287+
license-file.workspace = true
1288+
keywords.workspace = true
1289+
categories.workspace = true
1290+
publish.workspace = true
1291+
```
1292+
12311293
## Stabilized and removed features
12321294

12331295
### Compile progress
@@ -1408,66 +1470,4 @@ See the [Features chapter](features.md#dependency-features) for more information
14081470

14091471
The `-Ztimings` option has been stabilized as `--timings` in the 1.60 release.
14101472
(`--timings=html` and the machine-readable `--timings=json` output remain
1411-
unstable and require `-Zunstable-options`.)
1412-
1413-
### workspace-inheritance
1414-
1415-
* RFC: [#2906](https://github.com/rust-lang/rfcs/blob/master/text/2906-cargo-workspace-deduplicate.md)
1416-
* Tracking Issue: [#8415](https://github.com/rust-lang/cargo/issues/8415)
1417-
1418-
The `workspace-inheritance` feature allows workspace members to inherit fields
1419-
and dependencies from a workspace.
1420-
1421-
Example 1:
1422-
1423-
```toml
1424-
# in workspace's Cargo.toml
1425-
[workspace.dependencies]
1426-
log = "0.3.1"
1427-
log2 = { version = "2.0.0", package = "log" }
1428-
serde = { git = 'https://github.com/serde-rs/serde' }
1429-
wasm-bindgen-cli = { path = "crates/cli" }
1430-
```
1431-
1432-
```toml
1433-
# in a workspace member's Cargo.toml
1434-
[dependencies]
1435-
log.workspace = true
1436-
log2.workspace = true
1437-
```
1438-
1439-
Example 2:
1440-
```toml
1441-
# in workspace's Cargo.toml
1442-
[workspace.package]
1443-
version = "1.2.3"
1444-
authors = ["Nice Folks"]
1445-
description = "..."
1446-
documentation = "https://example.github.io/example"
1447-
readme = "README.md"
1448-
homepage = "https://example.com"
1449-
repository = "https://github.com/example/example"
1450-
license = "MIT"
1451-
license-file = "./LICENSE"
1452-
keywords = ["cli"]
1453-
categories = ["development-tools"]
1454-
publish = false
1455-
edition = "2018"
1456-
```
1457-
1458-
```toml
1459-
# in a workspace member's Cargo.toml
1460-
[package]
1461-
version.workspace = true
1462-
authors.workspace = true
1463-
description.workspace = true
1464-
documentation.workspace = true
1465-
readme.workspace = true
1466-
homepage.workspace = true
1467-
repository.workspace = true
1468-
license.workspace = true
1469-
license-file.workspace = true
1470-
keywords.workspace = true
1471-
categories.workspace = true
1472-
publish.workspace = true
1473-
```
1473+
unstable and require `-Zunstable-options`.)

0 commit comments

Comments
 (0)