Skip to content

Commit

Permalink
Auto merge of #10401 - ehuss:target-dep-doc-fix, r=alexcrichton
Browse files Browse the repository at this point in the history
Remove invalid target-specific dependency example.

The example with disjoint target configs does not work (and AFAIK has never worked).  It fails with the error:

```
  Dependency 'native' has different source paths depending on the build target. Each dependency must have a single canonical source path irrespective of build target.
```

This removes it to avoid confusion.

cc #7753
  • Loading branch information
bors committed Feb 22, 2022
2 parents c974e35 + f54ecdb commit e46a9ec
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/doc/src/reference/specifying-dependencies.md
Original file line number Diff line number Diff line change
Expand Up @@ -255,10 +255,10 @@ winhttp = "0.4.0"
openssl = "1.0.1"

[target.'cfg(target_arch = "x86")'.dependencies]
native = { path = "native/i686" }
native-i686 = { path = "native/i686" }

[target.'cfg(target_arch = "x86_64")'.dependencies]
native = { path = "native/x86_64" }
native-x86_64 = { path = "native/x86_64" }
```

Like with Rust, the syntax here supports the `not`, `any`, and `all` operators
Expand Down

0 comments on commit e46a9ec

Please sign in to comment.