]> git.proxmox.com Git - cargo.git/log
cargo.git
3 years agoSome cleanup.
Eric Huss [Tue, 4 May 2021 15:50:41 +0000 (08:50 -0700)]
Some cleanup.

3 years agoAuto merge of #9438 - ehuss:report-subcommand, r=alexcrichton
bors [Mon, 3 May 2021 14:41:36 +0000 (14:41 +0000)]
Auto merge of #9438 - ehuss:report-subcommand, r=alexcrichton

Add `report` subcommand.

This renames the `cargo describe-future-incompatibilities` subcommand to `cargo report future-incompatibilities`. The intent here is to have a general `report` subcommand that can be used for other reports in the future. This helps avoid the proliferation of top-level subcommands, and to help keep the CLI a little more organized.

3 years agoAuto merge of #9186 - weihanglo:issue-9054, r=alexcrichton
bors [Sat, 1 May 2021 15:35:48 +0000 (15:35 +0000)]
Auto merge of #9186 - weihanglo:issue-9054, r=alexcrichton

Respect Cargo.toml `[package.exclude]` even not in a git repo.

May resolves #9054

This bug (or feature?) has been lingering for a while. #7680 fixed the `cargo package` part but `cargo vendor` is still affected by the heuristic rule of ignoring dotfiles. ~~I propose to drop the rule and include dotfiles by default even if the package is not under git-controlled~~. See below.

## Updated: Changes Summary

`cargo vendor` vendors dependencies without git-controlled but `cargo package` often runs under a VCS like git. [These lines](https://github.com/rust-lang/cargo/blob/1ca930b/src/cargo/sources/path.rs#L161-L168) are where they diverges: `fn list_files_walk_except_dot_files_and_dirs` builds [its own ignore instance], which cannot merge with other filter rules from `[package.exclude]`. This causes some patterns to not work as expected, such as re-including file after ignoring dotfiles `[.*, !negated_file]`.

To make re-include (negate) rule works, this patch adds the excluding dotfiles rule directly into the `package.exclude` ignore instance if **_no include option nor git repo exists_**. Other old behaviors should not change in this patch.

[its own ignore instance]: https://github.com/rust-lang/cargo/blob/1ca930b6/src/cargo/sources/path.rs#L364-L366

3 years agoAuto merge of #9439 - ehuss:contrib-crates, r=Eh2406
bors [Sat, 1 May 2021 02:17:06 +0000 (02:17 +0000)]
Auto merge of #9439 - ehuss:contrib-crates, r=Eh2406

Document the other crates in the codebase in the contrib guide.

3 years agoAuto merge of #9440 - ehuss:fix-metrics-test, r=Eh2406
bors [Fri, 30 Apr 2021 21:50:27 +0000 (21:50 +0000)]
Auto merge of #9440 - ehuss:fix-metrics-test, r=Eh2406

Fix problem with metrics test.

The `counter_zero_slot` test was checking for an assertion that only fires in a debug build. However, upstream `rust-lang/rust` runs tests in `--release` mode. This unblocks the upstream update.

3 years agoFix problem with metrics test.
Eric Huss [Fri, 30 Apr 2021 21:03:16 +0000 (14:03 -0700)]
Fix problem with metrics test.

3 years agoDocument the other crates in the codebase in the contrib guide.
Eric Huss [Fri, 30 Apr 2021 20:24:35 +0000 (13:24 -0700)]
Document the other crates in the codebase in the contrib guide.

3 years agoAdd `report` subcommand.
Eric Huss [Fri, 30 Apr 2021 20:01:21 +0000 (13:01 -0700)]
Add `report` subcommand.

3 years agoAuto merge of #9395 - weihanglo:issue-8483, r=alexcrichton
bors [Fri, 30 Apr 2021 14:12:40 +0000 (14:12 +0000)]
Auto merge of #9395 - weihanglo:issue-8483, r=alexcrichton

Show transfer rate when fetching/updating registry index

Possibly fixes #8483.

To avoid blinking too frequently, update rate is throttled by one second.

I am not sure how to write tests for it ðŸ˜‚

<img width="896" alt="image" src="https://user-images.githubusercontent.com/14314532/115879831-ac62fb00-a47c-11eb-9b12-735ce8192ebe.png">

# Updated (2020-04-28)

Current looking

```
    Updating crates.io index
       Fetch [==>                      ]  14.50%, 258.45KiB/s

    Updating crates.io index
       Fetch [======>                  ]  40.50%, (1234/282342) resolving deltas
```

3 years agoAuto merge of #9434 - ehuss:collision-doc-j1, r=Eh2406
bors [Thu, 29 Apr 2021 18:21:49 +0000 (18:21 +0000)]
Auto merge of #9434 - ehuss:collision-doc-j1, r=Eh2406

Fix collision doc tests randomly failing.

This fixes some tests that were randomly failing on CI. The cause is that #9419 added a remove_dir_all on the `doc` directory. However, if two jobs are trying to write to that directory at the same time, this can cause errors.  The failure rate is low (a little over 1%), and I was unable to reproduce locally (only on GitHub's CI and only on the Windows job).

The solution is to run the jobs with -j1 so they run serially.

 I only saw errors for `collision_doc_sources`, but to be on the safe side I added j1 to similar tests.

3 years agoFix collision doc tests randomly failing.
Eric Huss [Thu, 29 Apr 2021 17:42:42 +0000 (10:42 -0700)]
Fix collision doc tests randomly failing.

3 years agoAuto merge of #9429 - ehuss:unstable-updates2, r=alexcrichton
bors [Thu, 29 Apr 2021 15:22:26 +0000 (15:22 +0000)]
Auto merge of #9429 - ehuss:unstable-updates2, r=alexcrichton

Add missing tracking issues and unstable docs.

Adds some missing tracking issues, and adds documentation for `-Z doctest-in-workspace`.

3 years agoAuto merge of #9421 - lf-:meowwwwww, r=alexcrichton
bors [Thu, 29 Apr 2021 14:54:23 +0000 (14:54 +0000)]
Auto merge of #9421 - lf-:meowwwwww, r=alexcrichton

Fix dep-info files emitting paths relative to deps' roots

Sample `shoo.d` file prior to this change is below, note the `build.rs`
at the end, which was not from my package.

From booping the debugger, I found this was coming from
`compiler_builtins`.  This is not really their bug though: if a build.rs
asks for rerun-if-changed on some crate relative path, this will happen
in general. So I've fixed it in Cargo and added a test to prevent it
regressing.

```
target/riscv64imac-mu-shoo-elf/release/shoo: /home/jade/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/../../stdarch/crates/core_arch/src/core_arch_docs.md /home/jade/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/../../stdarch/crates/core_arch/src/macros.rs /home/jade/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/../../stdarch/crates/core_arch/src/mod.rs /home/jade/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/../../stdarch/crates/core_arch/src/simd.rs /home/jade/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/../../stdarch/crates/core_arch/src/simd_llvm.rs crates/build_bits/src/lib.rs shoo/src/main.rs shoo/src/task.rs shoo/src/vectors.s build.rs
```

This change fixes it so it's like:

```
target/riscv64imac-mu-shoo-elf/release/shoo: /home/jade/.cargo/registry/src/github.com-1ecc6299db9ec823/compiler_builtins-0.1.39/build.rs /home/jade/.cargo/registry/src/github.com-1ecc6299db9ec823/log-0.4.14/build.rs /home/jade/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/../../stdarch/crates/core_arch/src/core_arch_docs.md /home/jade/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/../../stdarch/crates/core_arch/src/macros.rs /home/jade/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/../../stdarch/crates/core_arch/src/mod.rs /home/jade/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/../../stdarch/crates/core_arch/src/simd.rs /home/jade/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/../../stdarch/crates/core_arch/src/simd_llvm.rs crates/build_bits/src/lib.rs shoo/src/main.rs shoo/src/task.rs shoo/src/vectors.s
```

3 years agoAuto merge of #9428 - rust-lang:dependabot/add-v2-config-file, r=alexcrichton
bors [Thu, 29 Apr 2021 14:26:04 +0000 (14:26 +0000)]
Auto merge of #9428 - rust-lang:dependabot/add-v2-config-file, r=alexcrichton

Upgrade to GitHub-native Dependabot

_Dependabot Preview will be shut down on August 3rd, 2021. In order to keep getting Dependabot updates, please merge this PR and migrate to GitHub-native Dependabot before then._

Dependabot has been fully integrated into GitHub, so you no longer have to install and manage a separate app. This pull request migrates your configuration from Dependabot.com to a config file, using the [new syntax][new_syntax]. When merged, we'll swap out `dependabot-preview` (me) for a new `dependabot` app, and you'll be all set!

With this change, you'll now use the [Dependabot page in GitHub][dependabot_page], rather than the [Dependabot dashboard][dashboard], to monitor your version updates, and you'll configure Dependabot through the new config file rather than a UI.

If you've got any questions or feedback for us, please let us know by creating an issue in the [dependabot/dependabot-core][issues] repository.

[Learn more about migrating to GitHub-native Dependabot][learn]

Please note that regular ``@dependabot`` commands do not work on this pull request.

[dashboard]: https://app.dependabot.com/
[dependabot_page]: https://github.com/rust-lang/cargo/network/updates
[issues]: https://github.com/dependabot/dependabot-core/issues/new?assignees=%40dependabot%2Fpreview-migration-reviewers&labels=E%3A+preview-migration&template=migration-issue.md
[learn]: http://docs.github.com/code-security/supply-chain-security/upgrading-from-dependabotcom-to-github-native-dependabot
[new_syntax]: https://help.github.com/en/github/administering-a-repository/configuration-options-for-dependency-updates
[org_secrets_url]: https://github.com/organizations/rust-lang/settings/secrets/dependabot
[repo_secrets_url]: https://github.com/rust-lang/cargo/settings/secrets/dependabot

3 years agoAdd missing tracking issues and unstable docs.
Eric Huss [Wed, 28 Apr 2021 21:39:55 +0000 (14:39 -0700)]
Add missing tracking issues and unstable docs.

3 years agoUpgrade to GitHub-native Dependabot
dependabot-preview[bot] [Wed, 28 Apr 2021 21:38:01 +0000 (21:38 +0000)]
Upgrade to GitHub-native Dependabot

3 years agocomment about caveat of current transfer rate refresh
Weihang Lo [Wed, 28 Apr 2021 17:00:14 +0000 (01:00 +0800)]
comment about caveat of current transfer rate refresh

3 years agofix: bytes per second should not prefix with `i`
Weihang Lo [Wed, 28 Apr 2021 16:58:58 +0000 (00:58 +0800)]
fix: bytes per second should not prefix with `i`

3 years agoAuto merge of #9425 - JohnTitor:tweak-cargo-fix-test, r=alexcrichton
bors [Wed, 28 Apr 2021 14:16:49 +0000 (14:16 +0000)]
Auto merge of #9425 - JohnTitor:tweak-cargo-fix-test, r=alexcrichton

Only deny the `unused_mut` lint

This is needed for rust-lang/rust#83004 to pass CI.

3 years agoOnly deny the `unused_mut` lint
Yuki Okushi [Wed, 28 Apr 2021 08:59:57 +0000 (17:59 +0900)]
Only deny the `unused_mut` lint

3 years agoFix test on Windows: reprise
Jade [Wed, 28 Apr 2021 05:30:35 +0000 (22:30 -0700)]
Fix test on Windows: reprise

3 years agoFix the test on Windows
Jade [Wed, 28 Apr 2021 04:21:56 +0000 (21:21 -0700)]
Fix the test on Windows

3 years agorefactor: pass Instant to MetricsCounter
Weihang Lo [Tue, 27 Apr 2021 14:46:46 +0000 (22:46 +0800)]
refactor: pass Instant to MetricsCounter

3 years agoAuto merge of #9419 - ehuss:doc-meta-rebuild, r=alexcrichton
bors [Tue, 27 Apr 2021 14:35:53 +0000 (14:35 +0000)]
Auto merge of #9419 - ehuss:doc-meta-rebuild, r=alexcrichton

Fix rebuild issues with rustdoc.

This fixes two issues related to rebuilds with rustdoc:

* Switching features when running `cargo doc` would result in Cargo not rebuilding the documentation. This is because it was keeping the fingerprints in separate directories based on the features used. However, the rustdoc output isn't keyed off the metadata hash, so although the old fingerprint seemed "up to date", in reality the documentation was rewritten and needs to be rebuilt. The solution is to use a simplified hash for the fingerprint directory name.
* Removing items does not remove the files from the doc directory. This changes it to clear the package's doc directory before running rustdoc, to ensure any stale files are removed.

I'm a little concerned about potential performance impact of running `remove_dir_all`, but I think it shouldn't be too bad?

Fixes #7370

3 years agoAuto merge of #9418 - ehuss:always-meta, r=alexcrichton
bors [Tue, 27 Apr 2021 14:08:31 +0000 (14:08 +0000)]
Auto merge of #9418 - ehuss:always-meta, r=alexcrichton

Always use full metadata hash for -C metadata.

This changes it so that cargo always uses the full metadata hash for `-C metadata`. This ensures that even if a unit isn't using `-C extra-filename` that the symbol hashing uses all the fields used in the other cases.

This fixes an issue on macOS where a combination of split-debuginfo and incremental caused the same `.o` filenames to be used, which caused corruption in the incremental cache (see issue for details).

Fixes #9353.

3 years agoFix dep-info files emitting paths relative to deps' roots
Jade [Tue, 27 Apr 2021 11:25:46 +0000 (04:25 -0700)]
Fix dep-info files emitting paths relative to deps' roots

Sample `shoo.d` file prior to this change is below, note the `build.rs`
at the end, which was not from my package.

From booping the debugger, I found this was coming from
`compiler_builtins`.  This is not really their bug though: if a build.rs
asks for rerun-if-changed on some crate relative path, this will happen
in general. So I've fixed it in Cargo and added a test to prevent it
regressing.

```
target/riscv64imac-mu-shoo-elf/release/shoo: /home/jade/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/../../stdarch/crates/core_arch/src/core_arch_docs.md /home/jade/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/../../stdarch/crates/core_arch/src/macros.rs /home/jade/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/../../stdarch/crates/core_arch/src/mod.rs /home/jade/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/../../stdarch/crates/core_arch/src/simd.rs /home/jade/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/../../stdarch/crates/core_arch/src/simd_llvm.rs crates/build_bits/src/lib.rs shoo/src/main.rs shoo/src/task.rs shoo/src/vectors.s build.rs
```

This change fixes it so it's like:

```
target/riscv64imac-mu-shoo-elf/release/shoo: /home/jade/.cargo/registry/src/github.com-1ecc6299db9ec823/compiler_builtins-0.1.39/build.rs /home/jade/.cargo/registry/src/github.com-1ecc6299db9ec823/log-0.4.14/build.rs /home/jade/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/../../stdarch/crates/core_arch/src/core_arch_docs.md /home/jade/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/../../stdarch/crates/core_arch/src/macros.rs /home/jade/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/../../stdarch/crates/core_arch/src/mod.rs /home/jade/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/../../stdarch/crates/core_arch/src/simd.rs /home/jade/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/../../stdarch/crates/core_arch/src/simd_llvm.rs crates/build_bits/src/lib.rs shoo/src/main.rs shoo/src/task.rs shoo/src/vectors.s
```

3 years agorefactor: use metrics counter as an abstaction
Weihang Lo [Tue, 27 Apr 2021 05:48:36 +0000 (13:48 +0800)]
refactor: use metrics counter as an abstaction

3 years agofeat: add metrics counter utility
Weihang Lo [Tue, 27 Apr 2021 05:47:36 +0000 (13:47 +0800)]
feat: add metrics counter utility

3 years agoClear rustdoc output just before running rustdoc.
Eric Huss [Tue, 27 Apr 2021 04:04:01 +0000 (21:04 -0700)]
Clear rustdoc output just before running rustdoc.

3 years agoUse consolidated fingerprint directory for rustdoc.
Eric Huss [Tue, 27 Apr 2021 04:02:29 +0000 (21:02 -0700)]
Use consolidated fingerprint directory for rustdoc.

3 years agoAlways use full metadata hash for -C metadata.
Eric Huss [Tue, 27 Apr 2021 03:18:53 +0000 (20:18 -0700)]
Always use full metadata hash for -C metadata.

3 years agoAuto merge of #9030 - Ekleog:target-setting, r=alexcrichton
bors [Mon, 26 Apr 2021 15:00:47 +0000 (15:00 +0000)]
Auto merge of #9030 - Ekleog:target-setting, r=alexcrichton

Expose build.target .cargo/config setting as packages.target in Cargo.toml

Hey!

I'm trying to do my first cargo contribution by implementing per-crate target settings as per [the irlo thread](https://internals.rust-lang.org/t/proposal-move-some-cargo-config-settings-to-cargo-toml/13336) ; and I think I have a draft that looks good-ish (the root units returned by `generate_targets` have the right kinds set).

Closes #7004

**_Edit: the below problem description is now solved in the latest version of this PR, please ignore_**

But for some reason running on a test project now blocks on `Blocking waiting for file lock on build directory` and I have literally no idea how my changes could trigger this… would anyone have an idea of how the changes could lead to infinitely blocking there? (I already tried cargo clean just in case and it didn't appear to help)

FWIW, the output that looks hopeful to me is, on my testbed workspace:
```
Root units [out of generate_targets] are [...]:
 - package â€˜smtp-client’ with kind â€˜Target(CompileTarget { name: "x86_64-unknown-linux-gnu" })’
 - package â€˜smtp-server’ with kind â€˜Target(CompileTarget { name: "x86_64-unknown-linux-gnu" })’
 - package â€˜yuubind-config’ with kind â€˜Target(CompileTarget { name: "x86_64-unknown-linux-gnu" })’
 - package â€˜smtp-message-fuzz’ with kind â€˜Target(CompileTarget { name: "x86_64-unknown-linux-gnu" })’
 - package â€˜yuubind-rpc’ with kind â€˜Target(CompileTarget { name: "x86_64-unknown-linux-gnu" })’
 - package â€˜yuubind-config-example’ with kind â€˜Target(CompileTarget { name: "x86_64-unknown-linux-gnu" })’
 - package â€˜smtp-message-fuzz’ with kind â€˜Target(CompileTarget { name: "x86_64-unknown-linux-gnu" })’
 - package â€˜yuubind-config-example’ with kind â€˜Target(CompileTarget { name: "wasm32-unknown-unknown" })’
 - package â€˜smtp-queue’ with kind â€˜Target(CompileTarget { name: "x86_64-unknown-linux-gnu" })’
 - package â€˜smtp-message-fuzz’ with kind â€˜Target(CompileTarget { name: "x86_64-unknown-linux-gnu" })’
 - package â€˜smtp-message’ with kind â€˜Target(CompileTarget { name: "x86_64-unknown-linux-gnu" })’
 - package â€˜smtp-server-fuzz’ with kind â€˜Target(CompileTarget { name: "x86_64-unknown-linux-gnu" })’
 - package â€˜yuubind-config’ with kind â€˜Target(CompileTarget { name: "wasm32-unknown-unknown" })’
 - package â€˜yuubind’ with kind â€˜Target(CompileTarget { name: "x86_64-unknown-linux-gnu" })’
 - package â€˜smtp-queue-fs’ with kind â€˜Target(CompileTarget { name: "x86_64-unknown-linux-gnu" })’
```
(where both `yuubind-config` and `yuubind-config-example` are being configured to be `wasm32-unknown-unknown` and the other ones stay as host).

Interestingly enough, if I remove the `target` setting from `yuubind-config` (and leave it on `yuubind-config-example`) then it does no longer block on waiting for file lock on build directory, even though it does not actually compile with `wasm32-unknown-unknown`. And it does appear to correctly build yuubind-config-example as wasm32.

My investigation shows that it appears to happen iff there is a package with `package.target` being set that has dependencies.

This most likely is a bug in my code (eg. I build only the root units and not the whole unit graph maybe?), and am going to keep investigating it as such, but maybe someone would already know how dependency resolution could interact with build lock acquisition and give me hints?

Anyway, thank you all for all you do cargo!

3 years agoAuto merge of #9404 - ehuss:rustdoc-fingerprint-remove-dir, r=alexcrichton
bors [Mon, 26 Apr 2021 14:13:37 +0000 (14:13 +0000)]
Auto merge of #9404 - ehuss:rustdoc-fingerprint-remove-dir, r=alexcrichton

Some changes to rustdoc fingerprint checking.

#8640 introduced a check which deletes the `doc` directory if cargo detects it has stale contents from a different toolchain version. Rustdoc has some shared files (js and css for example) that can get corrupted between versions. Unfortunately that caused some problems with rustbuild which does a few unusual things. Rustbuild will:

* Create the `doc` directory before running `cargo doc` and places a `.stamp` file inside it.
* Creates symlinks of the `doc` directory so that they can be shared across different target directories (in particular, between rustc and rustdoc).

In order to address these issues, this PR does several things:

* Adds `-Z skip-rustdoc-fingerprint` to disable the `doc` clearing behavior.
* Don't delete the `doc` directory if the rustdoc fingerprint is missing. This is intended to help with the scenario where the user creates a `doc` directory ahead of time with pre-existing contents before the first build. The downside is that cargo will not be able to protect against switching from pre-1.53 to post-1.53.
* Don't delete the `doc` directory itself (just its contents). This should help if the user created the `doc` directory as a symlink to somewhere else.
* Don't delete hidden files in the `doc` directory. This isn't something that rustdoc creates.

Only the `-Z` change is needed for rustbuild. The others I figured I'd include just to be on the safe side in case there are other users doing unusual things (and I had already written them thinking they would work for rustbuild). Hopefully the rustbuild `.stamp` mechanism will be enough protection there.

Fixes #9336

3 years agoAuto merge of #9405 - Hawk777:cargo-pkg-for-build-scripts, r=ehuss
bors [Sat, 24 Apr 2021 23:21:19 +0000 (23:21 +0000)]
Auto merge of #9405 - Hawk777:cargo-pkg-for-build-scripts, r=ehuss

Document that CARGO_PKG_ are availble to build.rs

Fixes GH-9403.

3 years agofix build
Léo Gaspard [Sat, 24 Apr 2021 17:40:48 +0000 (19:40 +0200)]
fix build

3 years agoDocument that CARGO_PKG_ are availble to build.rs
Christopher Head [Sat, 24 Apr 2021 17:35:39 +0000 (10:35 -0700)]
Document that CARGO_PKG_ are availble to build.rs

3 years agohandle review comments
Léo Gaspard [Sat, 24 Apr 2021 17:09:13 +0000 (19:09 +0200)]
handle review comments

3 years agoImprove error message on missing feature gate
Léo Gaspard [Sat, 10 Apr 2021 05:00:27 +0000 (07:00 +0200)]
Improve error message on missing feature gate

3 years agoExpose build.target .cargo/config setting as packages.target in Cargo.toml
Léo Gaspard [Thu, 31 Dec 2020 01:33:39 +0000 (02:33 +0100)]
Expose build.target .cargo/config setting as packages.target in Cargo.toml

3 years agoAdd tests for new rustdoc fingerprint behavior.
Eric Huss [Sat, 24 Apr 2021 16:08:21 +0000 (09:08 -0700)]
Add tests for new rustdoc fingerprint behavior.

3 years agoAdd -Zskip-rustdoc-fingerprint
Eric Huss [Sat, 24 Apr 2021 15:22:44 +0000 (08:22 -0700)]
Add -Zskip-rustdoc-fingerprint

This is a hidden flag intended to only be used by rustbuild which will
skip the rustdoc fingerprint check. rustbuild does some funky things
with sharing the doc directory across multiple target directories via
symlinks, and that causes problems where after building in one target
directory, then switching to the second one, it will clear the contents.

3 years agorustdoc fingerprint: don't delete the top directory
Eric Huss [Sat, 24 Apr 2021 15:07:57 +0000 (08:07 -0700)]
rustdoc fingerprint: don't delete the top directory

In some cases, the directory may actually be a symlink created by the
user, and we don't want to delete it. Also, skip any hidden files added
by the user as well.

3 years agoDon't delete doc directories if the rustdoc fingerprint is missing.
Eric Huss [Fri, 16 Apr 2021 00:52:25 +0000 (17:52 -0700)]
Don't delete doc directories if the rustdoc fingerprint is missing.

This also rearranges the code a little bit to try to avoid some
duplication and to try to make it a little more compact.

3 years agoMake doc_fingerprint_respects_target_paths work on all targets.
Eric Huss [Fri, 16 Apr 2021 00:49:38 +0000 (17:49 -0700)]
Make doc_fingerprint_respects_target_paths work on all targets.

3 years agoAuto merge of #9397 - alexcrichton:fix-hash, r=ehuss
bors [Fri, 23 Apr 2021 20:54:54 +0000 (20:54 +0000)]
Auto merge of #9397 - alexcrichton:fix-hash, r=ehuss

Restore crates.io's `SourceId` hash value to before

This commit restores the hash value of the crates.io `SourceId` to what
it was before #9384. In #9384 the enum variants of `SourceKind` were
reordered which accidentally changed the hash value of the `SourceId`
for crates.io. A change here means that users with a new version of
Cargo will have to redownload the index and all crates, which is
something that we strive to avoid forcing.

In changing this, though, it required a manual implementation of `Ord`
to still contain the actual fix from #9384 which is to sort `SourceKind`
differently from how it's defined. I was curious as to why this was
necessary since it wasn't ever necessary in the past and this led to an
odd spelunking which turned up some interesting information. Turns out
Rust 1.47 and after had a breaking change where Cargo would sort
dependencies differently. This means that #9334 *could* have been opened
up much earlier, but it never was. We ironically only saw an issue when
we fixed this regression (although we didn't realize we were fixing a
regression). This means that we are now permanently codifying the
regression in Cargo.

3 years agoClarify some versions
Alex Crichton [Fri, 23 Apr 2021 19:27:19 +0000 (12:27 -0700)]
Clarify some versions

3 years agofix: message of progress when resolving deltas
Weihang Lo [Fri, 23 Apr 2021 19:18:30 +0000 (03:18 +0800)]
fix: message of progress when resolving deltas

3 years agoRestore crates.io's `SourceId` hash value to before
Alex Crichton [Fri, 23 Apr 2021 18:59:18 +0000 (11:59 -0700)]
Restore crates.io's `SourceId` hash value to before

This commit restores the hash value of the crates.io `SourceId` to what
it was before #9384. In #9384 the enum variants of `SourceKind` were
reordered which accidentally changed the hash value of the `SourceId`
for crates.io. A change here means that users with a new version of
Cargo will have to redownload the index and all crates, which is
something that we strive to avoid forcing.

In changing this, though, it required a manual implementation of `Ord`
to still contain the actual fix from #9384 which is to sort `SourceKind`
differently from how it's defined. I was curious as to why this was
necessary since it wasn't ever necessary in the past and this led to an
odd spelunking which turned up some interesting information. Turns out
Rust 1.47 and after had a breaking change where Cargo would sort
dependencies differently. This means that #9334 *could* have been opened
up much earlier, but it never was. We ironically only saw an issue when
we fixed this regression (although we didn't realize we were fixing a
regression). This means that we are now permanently codifying the
regression in Cargo.

3 years agoAuto merge of #9392 - alexcrichton:fix-patch-git-head-issue, r=ehuss
bors [Fri, 23 Apr 2021 18:45:03 +0000 (18:45 +0000)]
Auto merge of #9392 - alexcrichton:fix-patch-git-head-issue, r=ehuss

Fix loading `branch=master` patches in the v3 lock transition

This commit fixes an issue pointed out during #9352 where in the v2->v3
lock file transition (currently happening on nightly) Cargo will not
correctly use the previous lock file entry for `[patch]` directives that
point to git dependencies using `branch = 'master'` explicitly. The
reason for this is that Cargo previously, with the v2 format, considered
`branch=master` and `DefaultBranch` to be equivalent dependencies. Now
that Cargo treats those as distinct resolve nodes we need to load lock
files that use `DefaultBranch` and transparently use those for
`branch=master` dependencies.

These lock file nodes do not naturally unify so we have to go out of our
way to get the two to line up in modern Cargo. This was previously done
for the lock file at large, but the previous logic didn't take `[patch]`
into account. Unfortunately almost everything to do with `[patch]` and
lock files is pretty complicated, and this is no exception. The fix here
is wordy, verbose, and quite subtle in how it works. I'm pretty sure it
does work though and I think that this should be good enough to at least
transition most users off the v2 lock file format. Once this has baked
in Cargo for some time (on the scale of a year) I would hope that we
could just remove this logic since it's only really here for a
transitionary period.

Closes #9352

3 years agofix: remove total bytes received from progress message
Weihang Lo [Fri, 23 Apr 2021 16:56:34 +0000 (00:56 +0800)]
fix: remove total bytes received from progress message

3 years agofix: remove unnecessary progress tick rate limiting
Weihang Lo [Fri, 23 Apr 2021 16:42:45 +0000 (00:42 +0800)]
fix: remove unnecessary progress tick rate limiting

3 years agoAuto merge of #9396 - ehuss:changelog-1.52-beta, r=alexcrichton
bors [Fri, 23 Apr 2021 16:15:36 +0000 (16:15 +0000)]
Auto merge of #9396 - ehuss:changelog-1.52-beta, r=alexcrichton

Update changelog for 1.52 beta changes.

A few things were reverted on the beta branch.

3 years agoUpdate changelog for 1.52 beta changes.
Eric Huss [Fri, 23 Apr 2021 16:10:32 +0000 (09:10 -0700)]
Update changelog for 1.52 beta changes.

3 years agoAuto merge of #9393 - ehuss:build-std-updating, r=alexcrichton
bors [Fri, 23 Apr 2021 14:23:21 +0000 (14:23 +0000)]
Auto merge of #9393 - ehuss:build-std-updating, r=alexcrichton

Fix build-std updating the index on every build.

https://github.com/rust-lang/rust/pull/83776 has caused a problem where build-std will update the index on every build. That PR added `std_detect` from the `stdarch` submodule as a path dependency of `std`. However, since `stdarch` has a workspace of its own, an exclusion had to be added to `Cargo.toml` so that it does not treat `std_detect` as a workspace member (because nested workspaces are not supported).

The problem is that the std `Cargo.lock` file is built thinking that `std_detect` is *not* a workspace member. This means that its dev-dependencies are not included. However, when cargo resolves the std workspace, it doesn't know that `std_detect` should be excluded, so it considers it a workspace member (because it is a path dependency). This means that it expects the dev-dependencies to be in Cargo.lock. Because they are missing, it ends up poisoning the registry and triggering an update:

> poisoning registry `https://github.com/rust-lang/crates.io-index` because std_detect v0.1.5 (/Users/eric/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/src/rust/library/stdarch/crates/std_detect) looks like it changed auxv

The solution here is to skip dev-dependencies if they are not actively being resolved, even if the package is a workspace member.

This has happened before (#8962), so I have updated the test to check for it.

There are some alternative solutions I considered:

* Add support for nested workspaces. ðŸ˜„
* Use a symlink to `std_detect` in the `rust-lang/rust` repository so that it appears to cargo as-if it is "outside" of the stdarch workspace, and thus can be treated like a normal workspace member (and remove the "exclude"). That seems a little hacky.

Fixes #9390

3 years agofeat: show transfer rate and total bytes received
Weihang Lo [Fri, 23 Apr 2021 13:32:27 +0000 (21:32 +0800)]
feat: show transfer rate and total bytes received

3 years agorefactor: progress.tick support attaching message
Weihang Lo [Fri, 23 Apr 2021 13:29:24 +0000 (21:29 +0800)]
refactor: progress.tick support attaching message

3 years agoFix build-std updating the index on every build.
Eric Huss [Fri, 23 Apr 2021 00:17:15 +0000 (17:17 -0700)]
Fix build-std updating the index on every build.

3 years agoFix loading `branch=master` patches in the v3 lock transition
Alex Crichton [Tue, 20 Apr 2021 20:06:59 +0000 (13:06 -0700)]
Fix loading `branch=master` patches in the v3 lock transition

This commit fixes an issue pointed out during #9352 where in the v2->v3
lock file transition (currently happening on nightly) Cargo will not
correctly use the previous lock file entry for `[patch]` directives that
point to git dependencies using `branch = 'master'` explicitly. The
reason for this is that Cargo previously, with the v2 format, considered
`branch=master` and `DefaultBranch` to be equivalent dependencies. Now
that Cargo treats those as distinct resolve nodes we need to load lock
files that use `DefaultBranch` and transparently use those for
`branch=master` dependencies.

These lock file nodes do not naturally unify so we have to go out of our
way to get the two to line up in modern Cargo. This was previously done
for the lock file at large, but the previous logic didn't take `[patch]`
into account. Unfortunately almost everything to do with `[patch]` and
lock files is pretty complicated, and this is no exception. The fix here
is wordy, verbose, and quite subtle in how it works. I'm pretty sure it
does work though and I think that this should be good enough to at least
transition most users off the v2 lock file format. Once this has baked
in Cargo for some time (on the scale of a year) I would hope that we
could just remove this logic since it's only really here for a
transitionary period.

Closes #9352

3 years agoAuto merge of #9386 - ehuss:ehuss-profile-typo, r=alexcrichton
bors [Wed, 21 Apr 2021 13:59:34 +0000 (13:59 +0000)]
Auto merge of #9386 - ehuss:ehuss-profile-typo, r=alexcrichton

Fix typo in profile docs

3 years agoFix typo in profile docs
Eric Huss [Wed, 21 Apr 2021 00:36:28 +0000 (17:36 -0700)]
Fix typo in profile docs

3 years agoAuto merge of #9384 - alexcrichton:fix-order, r=ehuss
bors [Wed, 21 Apr 2021 00:13:47 +0000 (00:13 +0000)]
Auto merge of #9384 - alexcrichton:fix-order, r=ehuss

Fix disagreement about lockfile ordering on stable/nightly

This commit fixes an issue where the order of packages serialized into a
lock file differs on stable vs nightly. This is due to a bug introduced
in #9133 where a manual `Ord` implementation was replaced with a
`#[derive]`'d one. This was an unintended consequence of #9133 and means
that the same lock file produced by two different versions of Cargo only
differs in what order items are serialized.

With #9133 being reverted soon on the current beta channel this is
intended to be the nightly fix for #9334. This will hopefully mean that
those projects which don't build with beta/nightly will remain
unaffected, and those affected on beta/nightly will need to switch to
the new nightly ordering when it's published (which matches the current
stable). The reverted beta will match this ordering as well.

Closes #9334

3 years agoAuto merge of #9365 - jyn514:rustc-bootstrap-crate-name, r=ehuss
bors [Tue, 20 Apr 2021 23:43:12 +0000 (23:43 +0000)]
Auto merge of #9365 - jyn514:rustc-bootstrap-crate-name, r=ehuss

Don't give a hard error when the end-user specifies RUSTC_BOOTSTRAP=crate_name

Fixes https://github.com/rust-lang/cargo/issues/9362.
The whole point of https://github.com/rust-lang/rust/pull/77802/ was to allow specifying this granularly, giving a hard error defeats the point.

I didn't know how to check what targets were reverse-dependencies of build.rs, so I just unconditionally use the library name (and give a hard error for anything else, even if it's the name of one of the binaries). End-users can still opt-in with RUSTC_BOOTSTRAP=1, and no public binaries use RUSTC_BOOTSTRAP=1, so I don't think this a big deal in practice.

<details><summary>Script to verify all crates using RUSTC_BOOTSTRAP=1 have a library</summary>

```sh
curl https://pastebin.com/raw/fGQ97xP6 | cut -d / -f1 | grep -v shnatsel | grep -v cargo- | sed 's#-\([0-9]\)#/\1#' | xargs -i curl -s -I -L "https://docs.rs/{}/" -w "%{http_code}\n" -o/dev/null
```

It should output 20 200s in a row.

</details>

r? `@ehuss` cc `@mark-simulacrum`

I don't know what cargo's policy is for backports, but this should be backported to 1.52.

3 years agoAuto merge of #9369 - PicoJr:fix-9350, r=ehuss
bors [Tue, 20 Apr 2021 21:58:22 +0000 (21:58 +0000)]
Auto merge of #9369 - PicoJr:fix-9350, r=ehuss

Fix #9350 (cargo build -Z help is missing options)

> Do not merge yet, some options are still undocumented.

Fix #9350 (cargo build -Z help is missing options)

Add a procedural macro to declare `CliUnstable` struct and provide help messages instead of hard-coding help in `src/bin/cargo/cli.rs`

> Flags documentation: https://doc.rust-lang.org/nightly/cargo/reference/unstable.html

Feedback welcome

3 years agoFix #9350 (cargo build -Z help is missing options)
bors [Tue, 20 Apr 2021 21:58:22 +0000 (21:58 +0000)]
Fix #9350 (cargo build -Z help is missing options)

> Do not merge yet, some options are still undocumented.

Fix #9350 (cargo build -Z help is missing options)

Add a procedural macro to declare `CliUnstable` struct and provide help messages instead of hard-coding help in `src/bin/cargo/cli.rs`

> Flags documentation: https://doc.rust-lang.org/nightly/cargo/reference/unstable.html

Feedback welcome

3 years agoFix disagreement about lockfile ordering on stable/nightly
Alex Crichton [Tue, 20 Apr 2021 20:23:06 +0000 (13:23 -0700)]
Fix disagreement about lockfile ordering on stable/nightly

This commit fixes an issue where the order of packages serialized into a
lock file differs on stable vs nightly. This is due to a bug introduced
in #9133 where a manual `Ord` implementation was replaced with a
`#[derive]`'d one. This was an unintended consequence of #9133 and means
that the same lock file produced by two different versions of Cargo only
differs in what order items are serialized.

With #9133 being reverted soon on the current beta channel this is
intended to be the nightly fix for #9334. This will hopefully mean that
those projects which don't build with beta/nightly will remain
unaffected, and those affected on beta/nightly will need to switch to
the new nightly ordering when it's published (which matches the current
stable). The reverted beta will match this ordering as well.

Closes #9334

3 years agoAuto merge of #9379 - stanislav-tkach:patch-1, r=Eh2406
bors [Tue, 20 Apr 2021 13:01:37 +0000 (13:01 +0000)]
Auto merge of #9379 - stanislav-tkach:patch-1, r=Eh2406

an struct -> a struct

3 years agoSemVer Compatibility: an struct -> a struct
Stanislav Tkach [Tue, 20 Apr 2021 10:07:39 +0000 (13:07 +0300)]
SemVer Compatibility: an struct -> a struct

3 years agoAuto merge of #9378 - ehuss:help-windows, r=alexcrichton
bors [Mon, 19 Apr 2021 20:48:01 +0000 (20:48 +0000)]
Auto merge of #9378 - ehuss:help-windows, r=alexcrichton

Handle man pages better on Windows.

If a user has `man` installed on Windows via msys/mingw/etc, then `cargo help <subcommand>` would fail with `No manual entry for C:\Users\User\AppData\Local\Temp\cargo-manlSKwTQ`.  This is because the cygwin universe does not handle windows-style paths and does not auto-translate in this scenario.

The solution here is to run the command from within the temp directory and use a relative path which *should* work on all platforms and environments. I tested on windows (powershell, cmd, and mingw), macos, and linux.

Fixes #9197

3 years agoHandle man pages better on Windows.
Eric Huss [Mon, 19 Apr 2021 19:44:08 +0000 (12:44 -0700)]
Handle man pages better on Windows.

3 years agoAuto merge of #9368 - weihanglo:issue-9319, r=ehuss
bors [Mon, 19 Apr 2021 19:15:18 +0000 (19:15 +0000)]
Auto merge of #9368 - weihanglo:issue-9319, r=ehuss

fix: better error message when dependency/workspace member missing

May fix #9319

3 years agoAuto merge of #9376 - nicolaiunrein:patch-1, r=alexcrichton
bors [Mon, 19 Apr 2021 14:06:38 +0000 (14:06 +0000)]
Auto merge of #9376 - nicolaiunrein:patch-1, r=alexcrichton

Fix typo in book

While reading I found a little typo in the docs and corrected it.

3 years agoFix typo in book
nicolaiunrein [Mon, 19 Apr 2021 07:34:03 +0000 (09:34 +0200)]
Fix typo in book

While reading I found a little typo in the docs and corrected it.

3 years agoAuto merge of #9348 - matklad:wrapper-fingerprint, r=ehuss
bors [Sun, 18 Apr 2021 17:24:23 +0000 (17:24 +0000)]
Auto merge of #9348 - matklad:wrapper-fingerprint, r=ehuss

Don't re-use rustc cache when RUSTC_WRAPPER changes

We cache initial `rustc --version` invocations, to speed up noop builds.

We check the mtime of `rustc` to bust the cache if the complier changed.
However, before this PR, we didn't look at mtimes of `RUSTC_WRAPPER` /
`RUSTC_WORKSPACE_WRAPPER`, so we could've re-use old cache with new
wrapper.

3 years agoAuto merge of #9372 - weihanglo:missing-split-debuginfo-in-config, r=ehuss
bors [Sun, 18 Apr 2021 16:56:59 +0000 (16:56 +0000)]
Auto merge of #9372 - weihanglo:missing-split-debuginfo-in-config, r=ehuss

doc: add split-debuginfo doc in config chapter

Follow up for https://github.com/rust-lang/cargo/pull/9224.

3 years agodoc: add split-debuginfo doc in config chapter
Weihang Lo [Sun, 18 Apr 2021 01:38:39 +0000 (09:38 +0800)]
doc: add split-debuginfo doc in config chapter

3 years agoFix tests
Joshua Nelson [Sat, 17 Apr 2021 15:59:41 +0000 (11:59 -0400)]
Fix tests

3 years agominor cleanup
Joshua Nelson [Sat, 17 Apr 2021 15:33:51 +0000 (11:33 -0400)]
minor cleanup

3 years agoUse the library name to decide whether the override should be allowed from the top...
Joshua Nelson [Sat, 17 Apr 2021 15:31:48 +0000 (11:31 -0400)]
Use the library name to decide whether the override should be allowed from the top-level.

If there's no library, give a hard error unless features are
unconditionally allowed with RUSTC_BOOTSTRAP=1.

3 years agoUse the crate name instead of the package name
Joshua Nelson [Fri, 16 Apr 2021 16:24:20 +0000 (12:24 -0400)]
Use the crate name instead of the package name

This doesn't work because it uses the name of the build script, which is
always build_script_build. I'm not sure what to change it to - the name
of the library crate could be different than the name of the package,
and there could be multiple different crates being compiled in the same
package.

3 years agoDon't give a hard error on RUSTC_BOOTSTRAP=crate_name
Joshua Nelson [Fri, 16 Apr 2021 15:48:44 +0000 (11:48 -0400)]
Don't give a hard error on RUSTC_BOOTSTRAP=crate_name

3 years agofix: more error context for missing dep of workspace member
Weihang Lo [Sat, 17 Apr 2021 06:24:29 +0000 (14:24 +0800)]
fix: more error context for missing dep of workspace member

3 years agofix: more context when failed to load workspace member
Weihang Lo [Sat, 17 Apr 2021 05:56:39 +0000 (13:56 +0800)]
fix: more context when failed to load workspace member

3 years agoAuto merge of #9367 - weihanglo:refactor/remove-CargoResultExt, r=alexcrichton
bors [Fri, 16 Apr 2021 22:05:43 +0000 (22:05 +0000)]
Auto merge of #9367 - weihanglo:refactor/remove-CargoResultExt, r=alexcrichton

refactor: remove `CargoResultExt`

All `chain_err` -> `with_context` are done by IDE refactoring.

- Remove `CargoResultExt`.
- Call `format!` instead of `anyhow::format_err!` to reduce unnecessary macro expansions.
https://github.com/rust-lang/cargo/blob/e870eac9967b132825116525476d6875c305e4d8/src/cargo/util/errors.rs#L12-L18

3 years agoAuto merge of #9363 - ehuss:cargo-env-fingerprint, r=alexcrichton
bors [Fri, 16 Apr 2021 21:42:36 +0000 (21:42 +0000)]
Auto merge of #9363 - ehuss:cargo-env-fingerprint, r=alexcrichton

Track "CARGO" in environment fingerprint.

There is an issue where if a package includes an `env!("CARGO")`, that value is not tracked in the fingerprint. If different cargos are used, it will not rebuild. This changes it so that the path to cargo will be tracked in the fingerprint if the CARGO env var is in the dep-info file.

This came up with rust's build system where it [tracks the env](https://github.com/rust-lang/rust/blob/60158f4a7cf3e3063df6127d3f0d206921d285b0/src/bootstrap/config.rs#L574). If you build rust once, and then change the `cargo` value in `config.toml` and try building again, it would not pick up the change which caused me some confusion.

In theory, cargo could fingerprint this every time, but I figure that could be disruptive and trigger needlessly in some situations.

This diff is a little bigger than I would like for such an obscure case.  As an alternative, I think rustbuild could just print `cargo:rerun-if-env-changed=CARGO`, but I figure this could potentially be useful for other projects.

3 years agorefactor: remove unnecessary anyhow macro calls
Weihang Lo [Fri, 16 Apr 2021 18:42:44 +0000 (02:42 +0800)]
refactor: remove unnecessary anyhow macro calls

3 years agorefactor: remove CargoResultExt
Weihang Lo [Fri, 16 Apr 2021 18:13:55 +0000 (02:13 +0800)]
refactor: remove CargoResultExt

3 years agoDon't re-use rustc cache when RUSTC_WRAPPER changes
Aleksey Kladov [Mon, 12 Apr 2021 10:07:04 +0000 (13:07 +0300)]
Don't re-use rustc cache when RUSTC_WRAPPER changes

We cache initial `rustc --version` invocations, to speed up noop builds.

We check the mtime of `rustc` to bust the cache if the complier changed.
However, before this PR, we didn't look at mtimes of `RUSTC_WRAPPER` /
`RUSTC_WORKSPACE_WRAPPER`, so we could've re-use old cache with new
wrapper.

3 years agoTrack "CARGO" in environment fingerprint.
Eric Huss [Thu, 15 Apr 2021 20:54:46 +0000 (13:54 -0700)]
Track "CARGO" in environment fingerprint.

3 years agoAuto merge of #9356 - ehuss:clippy-allow, r=Eh2406
bors [Wed, 14 Apr 2021 20:23:16 +0000 (20:23 +0000)]
Auto merge of #9356 - ehuss:clippy-allow, r=Eh2406

Update clippy lint allow set.

This updates the clippy lints to default allow. We would prefer not to take clippy lint PRs at this time as there are a number of false positives and subjective style changes that we would rather not review.

I left a couple lints as `warn` that I have found useful when refactoring.

3 years agoUpdate testsuite/main.rs lint comment.
Eric Huss [Tue, 13 Apr 2021 19:25:13 +0000 (12:25 -0700)]
Update testsuite/main.rs lint comment.

3 years agoUpdate 2018 idioms comment.
Eric Huss [Tue, 13 Apr 2021 17:02:21 +0000 (10:02 -0700)]
Update 2018 idioms comment.

3 years agoUpdate clippy lint allow set.
Eric Huss [Tue, 13 Apr 2021 16:02:07 +0000 (09:02 -0700)]
Update clippy lint allow set.

3 years agoAuto merge of #9338 - tniessen:typo-doc-suport, r=ehuss
bors [Fri, 9 Apr 2021 19:19:37 +0000 (19:19 +0000)]
Auto merge of #9338 - tniessen:typo-doc-suport, r=ehuss

Fix 'suport' typo in documentation

3 years agoFix 'suport' typo in documentation
Tobias Nießen [Fri, 9 Apr 2021 18:03:28 +0000 (20:03 +0200)]
Fix 'suport' typo in documentation

3 years agoAuto merge of #9328 - ehuss:contrib-typo, r=Eh2406
bors [Sun, 4 Apr 2021 15:07:52 +0000 (15:07 +0000)]
Auto merge of #9328 - ehuss:contrib-typo, r=Eh2406

Fix typo in contrib docs.

😳

3 years agoFix typo in contrib docs.
Eric Huss [Sun, 4 Apr 2021 02:49:16 +0000 (19:49 -0700)]
Fix typo in contrib docs.

3 years agoAuto merge of #9323 - matthiaskrgr:clippy_v19, r=ehuss
bors [Fri, 2 Apr 2021 16:47:57 +0000 (16:47 +0000)]
Auto merge of #9323 - matthiaskrgr:clippy_v19, r=ehuss

fix clippy warnings

fixes these clippy warnings:

map_collect_result_unit
needless_borrow
needless_return
into_iter_on_ref
manual_flatten
match_like_matches_macro
bool_comparison

3 years agoAuto merge of #9283 - jonhoo:z-allowed-features, r=ehuss
bors [Fri, 2 Apr 2021 15:01:27 +0000 (15:01 +0000)]
Auto merge of #9283 - jonhoo:z-allowed-features, r=ehuss

Add -Zallow-features to match rustc's -Z

This PR implements the `-Zallow-features` permanently-unstable feature flag that explicitly enumerates which unstable features are allowed (assuming unstable features are permitted in the first place). This mirrors the `-Zallow-features` flag of `rustc` which serves the same purpose for `rustc` features:

https://github.com/rust-lang/rust/blob/5fe790e3c40710ecb95ddaadb98b59a3bb4f8326/compiler/rustc_session/src/options.rs#L856-L857

This flag makes it easier to beta-test unstable features "safely" by ensuring that only a single unstable feature is used if you only have control over build system, and not the source code that developers may end up using, as discussed in [this internals thread](https://internals.rust-lang.org/t/mechanism-for-beta-testing-unstable-features/14280).

3 years agofix clippy warnings
Matthias Krüger [Fri, 2 Apr 2021 10:30:36 +0000 (12:30 +0200)]
fix clippy warnings

fixes these clippy warnings:

map_collect_result_unit
needless_borrow
needless_return
into_iter_on_ref
manual_flatten
match_like_matches_macro
bool_comparison

3 years agoDon't use RUSTC_BOOTSTRAP for nightly-only tests
Jon Gjengset [Thu, 1 Apr 2021 17:39:05 +0000 (10:39 -0700)]
Don't use RUSTC_BOOTSTRAP for nightly-only tests