Skip to content

Commit

Permalink
Auto merge of #8007 - ehuss:1.43-backports, r=alexcrichton
Browse files Browse the repository at this point in the history
1.43 beta backports

* #7970 — Revert filter `debug_assertions` in `cfg` expressions.
* #7983 — Fix old anchors in manifest documentation.
* #7996 — Update libgit2 (fixes critical macos issue).
  • Loading branch information
bors committed Mar 17, 2020
2 parents bda5051 + fb5abcd commit 7b1e9f5
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 6 deletions.
6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ anyhow = "1.0"
filetime = "0.2"
flate2 = { version = "1.0.3", features = ["zlib"] }
fs2 = "0.4"
git2 = "0.12.0"
git2-curl = "0.13.0"
git2 = "0.13.0"
git2-curl = "0.14.0"
glob = "0.3.0"
hex = "0.4"
home = "0.5"
Expand All @@ -46,7 +46,7 @@ jobserver = "0.1.21"
lazycell = "1.2.0"
libc = "0.2"
log = "0.4.6"
libgit2-sys = "0.11.0"
libgit2-sys = "0.12.0"
memchr = "2.1.3"
num_cpus = "1.0"
opener = "0.4"
Expand Down
2 changes: 1 addition & 1 deletion crates/cargo-test-support/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ cargo = { path = "../.." }
cargo-test-macro = { path = "../cargo-test-macro" }
filetime = "0.2"
flate2 = "1.0"
git2 = "0.12"
git2 = "0.13"
glob = "0.3"
lazy_static = "1.0"
remove_dir_all = "0.5"
Expand Down
5 changes: 4 additions & 1 deletion src/cargo/core/compiler/build_context/target_info.rs
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,10 @@ impl TargetInfo {

fn not_user_specific_cfg(cfg: &CargoResult<Cfg>) -> bool {
if let Ok(Cfg::Name(cfg_name)) = cfg {
if cfg_name == "debug_assertions" || cfg_name == "proc_macro" {
// This should also include "debug_assertions", but it causes
// regressions. Maybe some day in the distant future it can be
// added (and possibly change the warning to an error).
if cfg_name == "proc_macro" {
return false;
}
}
Expand Down
5 changes: 5 additions & 0 deletions src/cargo/core/compiler/custom_build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,11 @@ fn build_work<'a, 'cfg>(cx: &mut Context<'a, 'cfg>, unit: &Unit<'a>) -> CargoRes
}
}
for (k, v) in cfg_map {
if k == "debug_assertions" {
// This cfg is always true and misleading, so avoid setting it.
// That is because Cargo queries rustc without any profile settings.
continue;
}
let k = format!("CARGO_CFG_{}", super::envify(&k));
match v {
Some(list) => {
Expand Down
11 changes: 10 additions & 1 deletion src/doc/src/reference/manifest.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ Versioning](https://semver.org/), so make sure you follow some basic rules:
traits, fields, types, functions, methods or anything else.
* Use version numbers with three numeric parts such as 1.0.0 rather than 1.0.

<a id="the-authors-field-optional"></a>
#### The `authors` field

The `authors` field lists people or organizations that are considered the
Expand All @@ -106,6 +107,7 @@ brackets at the end of each author.

> **Note**: [crates.io] requires at least one author to be listed.
<a id="the-edition-field-optional"></a>
#### The `edition` field

You can opt in to a specific [Rust Edition] for your package with the
Expand Down Expand Up @@ -137,6 +139,7 @@ description = "A short description of my package"

> **Note**: [crates.io] requires the `description` to be set.
<a id="the-documentation-field-optional"></a>
#### The `documentation` field

The `documentation` field specifies a URL to a website hosting the crate's
Expand Down Expand Up @@ -259,6 +262,7 @@ categories = ["command-line-utilities", "development-tools::cargo-plugins"]
> match one of the strings available at <https://crates.io/category_slugs>, and
> must match exactly.
<a id="the-workspace--field-optional"></a>
#### The `workspace` field

The `workspace` field can be used to configure the workspace that this package
Expand All @@ -280,6 +284,7 @@ table defined. That is, a crate cannot both be a root crate in a workspace
For more information, see the [workspaces chapter](workspaces.md).

<a id="package-build"></a>
<a id="the-build-field-optional"></a>
#### The `build` field

The `build` field specifies a file in the package root which is a [build
Expand All @@ -299,6 +304,7 @@ The default is `"build.rs"`, which loads the script from a file named
specify a path to a different file or `build = false` to disable automatic
detection of the build script.

<a id="the-links-field-optional"></a>
#### The `links` field

The `links` field specifies the name of a native library that is being linked
Expand All @@ -313,6 +319,7 @@ script guide.
links = "foo"
```

<a id="the-exclude-and-include-fields-optional"></a>
#### The `exclude` and `include` fields

You can explicitly specify that a set of file patterns should be ignored or
Expand Down Expand Up @@ -375,6 +382,7 @@ if any of those files change.

[gitignore]: https://git-scm.com/docs/gitignore

<a id="the-publish--field-optional"></a>
#### The `publish` field

The `publish` field can be used to prevent a package from being published to a
Expand All @@ -396,6 +404,7 @@ allowed to be published to.
publish = ["some-registry-name"]
```

<a id="the-metadata-table-optional"></a>
#### The `metadata` table

Cargo by default will warn about unused keys in `Cargo.toml` to assist in
Expand Down Expand Up @@ -539,7 +548,7 @@ more detail.
"#integration-tests": "cargo-targets.html#integration-tests",
"#configuring-a-target": "cargo-targets.html#configuring-a-target",
"#target-auto-discovery": "cargo-targets.html#target-auto-discovery",
"#the-required-features-field": "cargo-targets.html#the-required-features-field",
"#the-required-features-field-optional": "cargo-targets.html#the-required-features-field",
"#building-dynamic-or-static-libraries": "cargo-targets.html#the-crate-type-field",
"#the-workspace-section": "workspaces.html#the-workspace-section",
"#virtual-manifest": "workspaces.html",
Expand Down

0 comments on commit 7b1e9f5

Please sign in to comment.